- final ShardIdentifier name;
- final Map<String, String> peerAddresses;
- final DatastoreContext datastoreContext;
- final SchemaContext schemaContext;
+ protected final ShardIdentifier name;
+ protected final Map<String, String> peerAddresses;
+ protected final DatastoreContext datastoreContext;
+ protected final SchemaContext schemaContext;
+
+ protected AbstractShardCreator(final ShardIdentifier name, final Map<String, String> peerAddresses,
+ final DatastoreContext datastoreContext, final SchemaContext schemaContext) {
+ this.name = Preconditions.checkNotNull(name, "name should not be null");
+ this.peerAddresses = Preconditions.checkNotNull(peerAddresses, "peerAddresses should not be null");
+ this.datastoreContext = Preconditions.checkNotNull(datastoreContext, "dataStoreContext should not be null");
+ this.schemaContext = Preconditions.checkNotNull(schemaContext, "schemaContext should not be null");
+ }
+ }
+
+ private static class ShardCreator extends AbstractShardCreator {
+ private static final long serialVersionUID = 1L;