@Test public void standaloneModeExplicitShardIdIsNull_shouldReturnFalse() { int shardCount = randomShardCountGreaterThanOne(); int shardInstance = randomPositiveInteger(); when(node.getExplicitShardId()).thenReturn(null); assertFalse(router.routeNode(shardCount, shardInstance, node)); }
@Override public Boolean routeNode(int shardCount, int shardInstance, Node node) { Integer explicitShardId = node.getExplicitShardId(); if (explicitShardId == null) { debug("ExplicitShardId property is not set for node {} ", node.getNodeRef()); return negativeReturnValue(); } return explicitShardId.equals(shardInstance); }
ExplicitShardIdWithStaticPropertyRouter extends ComposableDocRouter { @Override public Boolean routeNode(int shardCount, int shardInstance, Node node) { Integer explicitShardId = node.getExplicitShardId(); if (explicitShardId == null) { debug("ExplicitShardId property is not set for node {} ", node.getNodeRef()); return negativeReturnValue(); } return explicitShardId.equals(shardInstance); } }
ExplicitShardIdWithStaticPropertyRouter extends ComposableDocRouter { @Override public Boolean routeNode(int shardCount, int shardInstance, Node node) { Integer explicitShardId = node.getExplicitShardId(); if (explicitShardId == null) { debug("ExplicitShardId property is not set for node {} ", node.getNodeRef()); return negativeReturnValue(); } return explicitShardId.equals(shardInstance); } ExplicitShardIdWithStaticPropertyRouter();  ExplicitShardIdWithStaticPropertyRouter(boolean isInStandaloneMode); }
ExplicitShardIdWithStaticPropertyRouter extends ComposableDocRouter { @Override public Boolean routeNode(int shardCount, int shardInstance, Node node) { Integer explicitShardId = node.getExplicitShardId(); if (explicitShardId == null) { debug("ExplicitShardId property is not set for node {} ", node.getNodeRef()); return negativeReturnValue(); } return explicitShardId.equals(shardInstance); } ExplicitShardIdWithStaticPropertyRouter();  ExplicitShardIdWithStaticPropertyRouter(boolean isInStandaloneMode); @Override Boolean routeAcl(int shardCount, int shardInstance, Acl acl); @Override Boolean routeNode(int shardCount, int shardInstance, Node node); }
ExplicitShardIdWithStaticPropertyRouter extends ComposableDocRouter { @Override public Boolean routeNode(int shardCount, int shardInstance, Node node) { Integer explicitShardId = node.getExplicitShardId(); if (explicitShardId == null) { debug("ExplicitShardId property is not set for node {} ", node.getNodeRef()); return negativeReturnValue(); } return explicitShardId.equals(shardInstance); } ExplicitShardIdWithStaticPropertyRouter();  ExplicitShardIdWithStaticPropertyRouter(boolean isInStandaloneMode); @Override Boolean routeAcl(int shardCount, int shardInstance, Acl acl); @Override Boolean routeNode(int shardCount, int shardInstance, Node node);  }