import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opendaylight.controller.cluster.datastore.DatastoreContext;
-import org.opendaylight.controller.cluster.datastore.ShardPropsCreator;
+import org.opendaylight.controller.cluster.datastore.Shard;
import org.opendaylight.controller.cluster.datastore.config.ModuleShardConfiguration;
/**
*/
public class CreateShard {
private final ModuleShardConfiguration moduleShardConfig;
- private final ShardPropsCreator shardPropsCreator;
+ private final Shard.AbstractBuilder<?, ?> shardBuilder;
private final DatastoreContext datastoreContext;
/**
* @param datastoreContext the DatastoreContext for the new shard. If null, the default is used.
*/
public CreateShard(@Nonnull ModuleShardConfiguration moduleShardConfig,
- @Nonnull ShardPropsCreator shardPropsCreator, @Nullable DatastoreContext datastoreContext) {
+ @Nonnull Shard.AbstractBuilder<?, ?> shardBuilder, @Nullable DatastoreContext datastoreContext) {
this.moduleShardConfig = Preconditions.checkNotNull(moduleShardConfig);
- this.shardPropsCreator = Preconditions.checkNotNull(shardPropsCreator);
+ this.shardBuilder = Preconditions.checkNotNull(shardBuilder);
this.datastoreContext = datastoreContext;
}
- @Nonnull public ModuleShardConfiguration getModuleShardConfig() {
+ @Nonnull
+ public ModuleShardConfiguration getModuleShardConfig() {
return moduleShardConfig;
}
- @Nonnull public ShardPropsCreator getShardPropsCreator() {
- return shardPropsCreator;
+ @Nonnull
+ public Shard.AbstractBuilder<?, ?> getShardBuilder() {
+ return shardBuilder;
}
- @Nullable public DatastoreContext getDatastoreContext() {
+ @Nullable
+ public DatastoreContext getDatastoreContext() {
return datastoreContext;
}
@Override
public String toString() {
- return "CreateShard [moduleShardConfig=" + moduleShardConfig + ", shardPropsCreator=" + shardPropsCreator + "]";
+ return "CreateShard [moduleShardConfig=" + moduleShardConfig + ", shardPropsCreator=" + shardBuilder + "]";
}
}