public SqliteQueryExecutor(QueryConfiguration configuration, Akka.Serialization.Serialization serialization, ITimestampProvider timestampProvider) : base(configuration, serialization, timestampProvider) { ByTagSql = base.ByTagSql + " LIMIT @Take"; CreateEventsJournalSql = $@" CREATE TABLE IF NOT EXISTS {configuration.FullJournalTableName} ( {configuration.OrderingColumnName} INTEGER PRIMARY KEY NOT NULL, {configuration.PersistenceIdColumnName} VARCHAR(255) NOT NULL, {configuration.SequenceNrColumnName} INTEGER(8) NOT NULL, {configuration.IsDeletedColumnName} INTEGER(1) NOT NULL, {configuration.ManifestColumnName} VARCHAR(255) NULL, {configuration.TimestampColumnName} INTEGER NOT NULL, {configuration.PayloadColumnName} BLOB NOT NULL, {configuration.TagsColumnName} VARCHAR(2000) NULL, UNIQUE ({configuration.PersistenceIdColumnName}, {configuration.SequenceNrColumnName}) );"; CreateMetaTableSql = $@" CREATE TABLE IF NOT EXISTS {configuration.FullMetaTableName} ( {configuration.PersistenceIdColumnName} VARCHAR(255) NOT NULL, {configuration.SequenceNrColumnName} INTEGER(8) NOT NULL, PRIMARY KEY ({configuration.PersistenceIdColumnName}, {configuration.SequenceNrColumnName}) );"; }
public LighthouseConfig() { Akka = ConfigurationFactory.FromResource <LighthouseConfig>("MightyCalc.LightHouse.akka.conf") .InitFromEnvironment() .WithFallback(HoconConfigurations.FullDebug); ClusterName = Akka.GetString("lighthouse.actorsystem"); }
protected JournalDbEngine(JournalSettings settings, Akka.Serialization.Serialization serialization) { Settings = settings; _serialization = serialization; QueryMapper = new DefaultJournalQueryMapper(serialization); PendingOperations = new LinkedList<CancellationTokenSource>(); }
public SqliteSnapshotQueryExecutor(QueryConfiguration configuration, Akka.Serialization.Serialization serialization) : base(configuration, serialization) { CreateSnapshotTableSql = $@" CREATE TABLE IF NOT EXISTS {configuration.FullSnapshotTableName} ( {configuration.PersistenceIdColumnName} VARCHAR(255) NOT NULL, {configuration.SequenceNrColumnName} INTEGER(8) NOT NULL, {configuration.TimestampColumnName} INTEGER(8) NOT NULL, {configuration.ManifestColumnName} VARCHAR(255) NOT NULL, {configuration.PayloadColumnName} BLOB NOT NULL, PRIMARY KEY ({configuration.PersistenceIdColumnName}, {configuration.SequenceNrColumnName}) );"; InsertSnapshotSql = $@" UPDATE {configuration.FullSnapshotTableName} SET {configuration.TimestampColumnName} = @Timestamp, {configuration.ManifestColumnName} = @Manifest, {configuration.PayloadColumnName} = @Payload WHERE {configuration.PersistenceIdColumnName} = @PersistenceId AND {configuration.SequenceNrColumnName} = @SequenceNr; INSERT OR IGNORE INTO {configuration.FullSnapshotTableName} ({configuration.PersistenceIdColumnName}, {configuration.SequenceNrColumnName}, {configuration.TimestampColumnName}, {configuration.ManifestColumnName}, {configuration.PayloadColumnName}) VALUES (@PersistenceId, @SequenceNr, @Timestamp, @Manifest, @Payload)"; }
void IGreeterWithObserver_NoReply.Unsubscribe(Akka.Interfaced.SlimSocket.IGreetObserver observer) { var requestMessage = new RequestMessage { InvokePayload = new IGreeterWithObserver_PayloadTable.Unsubscribe_Invoke { observer = (GreetObserver)observer } }; SendRequest(requestMessage); }
public DefaultSnapshotQueryMapper(Akka.Serialization.Serialization serialization) { _serialization = serialization; }
void ISubject_NoReply.Unsubscribe(Akka.Interfaced.SlimServer.ISubjectObserver observer) { var requestMessage = new RequestMessage { InvokePayload = new ISubject_PayloadTable.Unsubscribe_Invoke { observer = (SubjectObserver)observer } }; SendRequest(requestMessage); }
public Snap(Akka.Persistence.AtLeastOnceDeliverySnapshot snapshot) { this.Snapshot = snapshot; }
public PostgreSqlJournalEngine(JournalSettings journalSettings, Akka.Serialization.Serialization serialization) : base(journalSettings, serialization) { QueryBuilder = new PostgreSqlJournalQueryBuilder(journalSettings.TableName, journalSettings.SchemaName); QueryMapper = new PostgreSqlJournalQueryMapper(serialization); }
public DefaultJournalQueryMapper(Akka.Serialization.Serialization serialization) { _serialization = serialization; }
void ISurrogate_NoReply.GetPath(Akka.Actor.ActorPath path) { var requestMessage = new RequestMessage { InvokePayload = new ISurrogate_PayloadTable.GetPath_Invoke { path = path } }; SendRequest(requestMessage); }
private SendToAll SendToAllFromProto(Akka.Cluster.PubSub.Serializers.Proto.SendToAll send) { return new SendToAll(send.Path, PayloadFromProto(send.Payload), send.AllButSelf); }
public Task<Akka.Actor.ActorPath> GetPath(Akka.Actor.ActorPath path) { var requestMessage = new RequestMessage { InvokePayload = new ISurrogate_PayloadTable.GetPath_Invoke { path = path } }; return SendRequestAndReceive<Akka.Actor.ActorPath>(requestMessage); }
void ISurrogate_NoReply.GetAddress(Akka.Actor.Address address) { var requestMessage = new RequestMessage { InvokePayload = new ISurrogate_PayloadTable.GetAddress_Invoke { address = address } }; SendRequest(requestMessage); }
public Task<Akka.Actor.Address> GetAddress(Akka.Actor.Address address) { var requestMessage = new RequestMessage { InvokePayload = new ISurrogate_PayloadTable.GetAddress_Invoke { address = address } }; return SendRequestAndReceive<Akka.Actor.Address>(requestMessage); }
void ITest_NoReply.CallWithActor(Akka.Interfaced.LogFilter.Tests.ITest test) { var requestMessage = new RequestMessage { InvokePayload = new ITest_PayloadTable.CallWithActor_Invoke { test = test } }; SendRequest(requestMessage); }
public Task CallWithActor(Akka.Interfaced.LogFilter.Tests.ITest test) { var requestMessage = new RequestMessage { InvokePayload = new ITest_PayloadTable.CallWithActor_Invoke { test = test } }; return SendRequestAndWait(requestMessage); }
private Delta DeltaFromProto(Akka.Cluster.PubSub.Serializers.Proto.Delta delta) { return new Delta(delta.BucketsList.Select(b => { var content = b.ContentList.Aggregate(ImmutableDictionary<string, ValueHolder>.Empty, (map, entry) => map.Add(entry.Key, new ValueHolder(entry.Version, entry.HasRef ? ResolveActorRef(entry.Ref) : null))); return new Bucket(AddressFromProto(b.Owner), b.Version, content); }).ToArray()); }
void IUserLogin_NoReply.Login(string id, string password, Akka.Interfaced.TestKit.Tests.IUserObserver observer) { var requestMessage = new RequestMessage { InvokePayload = new IUserLogin_PayloadTable.Login_Invoke { id = id, password = password, observer = (UserObserver)observer } }; SendRequest(requestMessage); }
private Send SendFromProto(Akka.Cluster.PubSub.Serializers.Proto.Send send) { return new Send(send.Path, PayloadFromProto(send.Payload), send.LocalAffinity); }
public PostgreSqlJournalQueryMapper(Akka.Serialization.Serialization serialization) { _serialization = serialization; }
private Publish PublishFromProto(Akka.Cluster.PubSub.Serializers.Proto.Publish publish) { return new Publish(publish.Topic, PayloadFromProto(publish.Payload)); }
protected AbstractQueryExecutor(QueryConfiguration configuration, Akka.Serialization.Serialization serialization) { Configuration = configuration; Serialization = serialization; SelectSnapshotSql = $@" SELECT {Configuration.PersistenceIdColumnName}, {Configuration.SequenceNrColumnName}, {Configuration.TimestampColumnName}, {Configuration.ManifestColumnName}, {Configuration.PayloadColumnName} FROM {Configuration.FullSnapshotTableName} WHERE {Configuration.PersistenceIdColumnName} = @PersistenceId AND {Configuration.SequenceNrColumnName} <= @SequenceNr AND {Configuration.TimestampColumnName} <= @Timestamp ORDER BY {Configuration.SequenceNrColumnName} DESC"; DeleteSnapshotSql = $@" DELETE FROM {Configuration.FullSnapshotTableName} WHERE {Configuration.PersistenceIdColumnName} = @PersistenceId AND {Configuration.SequenceNrColumnName} = @SequenceNr"; DeleteSnapshotRangeSql = $@" DELETE FROM {Configuration.FullSnapshotTableName} WHERE {Configuration.PersistenceIdColumnName} = @PersistenceId AND {Configuration.SequenceNrColumnName} <= @SequenceNr AND {Configuration.TimestampColumnName} <= @Timestamp"; InsertSnapshotSql = $@" INSERT INTO {Configuration.FullSnapshotTableName} ( {Configuration.PersistenceIdColumnName}, {Configuration.SequenceNrColumnName}, {Configuration.TimestampColumnName}, {Configuration.ManifestColumnName}, {Configuration.PayloadColumnName}) VALUES (@PersistenceId, @SequenceNr, @Timestamp, @Manifest, @Payload)"; }
public SqliteJournalEngine(JournalSettings settings, Akka.Serialization.Serialization serialization) : base(settings, serialization) { _settings = settings; QueryBuilder = new QueryBuilder(settings); }
public void ChannelOpen(Akka.Interfaced.SlimServer.IActorBoundChannel channel, object tag) { var payload = new IActorBoundChannelObserver_PayloadTable.ChannelOpen_Invoke { channel = channel, tag = tag }; Notify(payload); }
public Task Unsubscribe(Akka.Interfaced.SlimServer.ISubjectObserver observer) { var requestMessage = new RequestMessage { InvokePayload = new ISubject_PayloadTable.Unsubscribe_Invoke { observer = (SubjectObserver)observer } }; return SendRequestAndWait(requestMessage); }
public OracleQueryMapper(Akka.Serialization.Serialization serialization) { _serialization = serialization; }
public Task<Akka.Interfaced.TestKit.Tests.IUser> Login(string id, string password, Akka.Interfaced.TestKit.Tests.IUserObserver observer) { var requestMessage = new RequestMessage { InvokePayload = new IUserLogin_PayloadTable.Login_Invoke { id = id, password = password, observer = (UserObserver)observer } }; return SendRequestAndReceive<Akka.Interfaced.TestKit.Tests.IUser>(requestMessage); }
public PostgreSqlSnapshotQueryMapper(Akka.Serialization.Serialization serialization) { _serialization = serialization; }
public SqliteQueryMapper(Akka.Serialization.Serialization serialization) { _serialization = serialization; }
public Task Unsubscribe(Akka.Interfaced.SlimSocket.IGreetObserver observer) { var requestMessage = new RequestMessage { InvokePayload = new IGreeterWithObserver_PayloadTable.Unsubscribe_Invoke { observer = (GreetObserver)observer } }; return SendRequestAndWait(requestMessage); }