return datastoreContextBuilder;
}
+ @Deprecated(since = "7.0.0", forRemoval = true)
public DistributedDataStore setupDistributedDataStore(final String typeName, final String moduleShardsConfig,
final boolean waitUntilLeader,
final EffectiveModelContext schemaContext) throws Exception {
return setupDistributedDataStore(typeName, moduleShardsConfig, "modules.conf", waitUntilLeader, schemaContext);
}
+ @Deprecated(since = "7.0.0", forRemoval = true)
public DistributedDataStore setupDistributedDataStore(final String typeName, final String moduleShardsConfig,
final String modulesConfig,
final boolean waitUntilLeader,
}
}
+ @Deprecated(since = "7.0.0", forRemoval = true)
public DistributedDataStore setupDistributedDataStoreWithoutConfig(final String typeName,
final EffectiveModelContext schemaContext) {
final ClusterWrapper cluster = new ClusterWrapperImpl(getSystem());
return dataStore;
}
+ @Deprecated(since = "7.0.0", forRemoval = true)
public DistributedDataStore setupDistributedDataStoreWithoutConfig(final String typeName,
final EffectiveModelContext schemaContext,
final LogicalDatastoreType storeType) {
}
public static ActorRef findLocalShard(final ActorUtils actorUtils, final String shardName) {
- ActorRef shard = null;
- for (int i = 0; i < 20 * 5 && shard == null; i++) {
+ for (int i = 0; i < 20 * 5; i++) {
Uninterruptibles.sleepUninterruptibly(50, TimeUnit.MILLISECONDS);
Optional<ActorRef> shardReply = actorUtils.findLocalShard(shardName);
if (shardReply.isPresent()) {
- shard = shardReply.get();
+ return shardReply.orElseThrow();
}
}
- return shard;
+ return null;
}
public static void waitUntilShardIsDown(final ActorUtils actorUtils, final String shardName) {