Preconditions.checkNotNull(configuration, "configuration should not be null");
Preconditions.checkNotNull(datastoreContextFactory, "datastoreContextFactory should not be null");
- this.type = datastoreContextFactory.getBaseDatastoreContext().getDataStoreType();
+ this.type = datastoreContextFactory.getBaseDatastoreContext().getDataStoreName();
String shardManagerId = ShardManagerIdentifier.builder().type(type).build().toString();
@Override
public void onDatastoreContextUpdated(DatastoreContextFactory contextFactory) {
- LOG.info("DatastoreContext updated for data store {}", actorContext.getDataStoreType());
+ LOG.info("DatastoreContext updated for data store {}", actorContext.getDataStoreName());
actorContext.setDatastoreContext(contextFactory);
datastoreConfigMXBean.setContext(contextFactory.getBaseDatastoreContext());
@Override
public void close() {
+ LOG.info("Closing data store {}", type);
+
if (datastoreConfigMXBean != null) {
datastoreConfigMXBean.unregisterMBean();
}
}
}
- private ActorRef createShardManager(ActorSystem actorSystem, ShardManager.Builder builder, String shardDispatcher,
- String shardManagerId){
+ private static ActorRef createShardManager(ActorSystem actorSystem, ShardManager.Builder builder,
+ String shardDispatcher, String shardManagerId) {
Exception lastException = null;
for(int i=0;i<100;i++) {