+ public static Props props(final ShardIdentifier name,
+ final Map<ShardIdentifier, String> peerAddresses,
+ DatastoreContext datastoreContext) {
+ Preconditions.checkNotNull(name, "name should not be null");
+ Preconditions.checkNotNull(peerAddresses, "peerAddresses should not be null");
+ Preconditions.checkNotNull(datastoreContext, "shardContext should not be null");
+
+ return Props.create(new ShardCreator(name, peerAddresses, datastoreContext));
+ }
+
+ @Override public void onReceiveRecover(Object message) {
+ LOG.debug("onReceiveRecover: Received message {} from {}", message.getClass().toString(),
+ getSender());
+
+ if (message instanceof RecoveryFailure){
+ LOG.error(((RecoveryFailure) message).cause(), "Recovery failed because of this cause");
+ } else {
+ super.onReceiveRecover(message);
+ }
+ }