public ClusterShardingMessageSerializerSpec() : base(SpecConfig) { serializer = new ClusterShardingMessageSerializer((ExtendedActorSystem)Sys); region1 = Sys.ActorOf(Props.Empty, "region1"); region2 = Sys.ActorOf(Props.Empty, "region2"); region3 = Sys.ActorOf(Props.Empty, "region3"); regionProxy1 = Sys.ActorOf(Props.Empty, "regionProxy1"); regionProxy2 = Sys.ActorOf(Props.Empty, "regionProxy2"); }
public LmdbDurableStore(Config config) { _config = config.GetConfig("lmdb"); if (_config.IsNullOrEmpty()) { throw ConfigurationException.NullOrEmptyConfig <LmdbDurableStore>("akka.cluster.distributed-data.durable.lmdb"); } _log = Context.GetLogger(); _serialization = Context.System.Serialization; _serializer = (SerializerWithStringManifest)_serialization.FindSerializerForType(typeof(DurableDataEnvelope)); _manifest = _serializer.Manifest(new DurableDataEnvelope(GCounter.Empty)); var useWriteBehind = _config.GetString("write-behind-interval", "").ToLowerInvariant(); _writeBehindInterval = useWriteBehind == "off" || useWriteBehind == "false" || useWriteBehind == "no" ? TimeSpan.Zero : _config.GetTimeSpan("write-behind-interval"); _mapSize = _config.GetByteSize("map-size") ?? 100 * 1024 * 1024; var path = _config.GetString("dir"); _dir = path.EndsWith(DatabaseName) ? Path.GetFullPath($"{path}-{Context.System.Name}-{Self.Path.Parent.Name}-{Cluster.Cluster.Get(Context.System).SelfAddress.Port}") : Path.GetFullPath(path); if (!Directory.Exists(_dir)) { Directory.CreateDirectory(_dir); } _log.Info($"Using durable data in LMDB directory [{_dir}]"); Init(); }
public ClusterClientMessageSerializerSpec() : base(ClusterClientReceptionist.DefaultConfig()) { serializer = new ClusterClientMessageSerializer((ExtendedActorSystem)Sys); }
public DistributedPubSubMessageSerializerSpec() : base(DistributedPubSub.DefaultConfig()) { serializer = new DistributedPubSubMessageSerializer((ExtendedActorSystem)Sys); }
public ClusterSingletonMessageSerializerSpec() : base(ClusterSingletonManager.DefaultConfig()) { serializer = new ClusterSingletonMessageSerializer((ExtendedActorSystem)Sys); }