@Test public void assertGetItemWhenNotExecutionFailoverPath() { assertNull(failoverNode.getItemByExecutionFailoverPath("/test_job/sharding/0/completed")); }
public Integer getItemByExecutionFailoverPath(final String path) { if (!isFailoverPath(path)) { return null; } return Integer.parseInt(path.substring(jobNodePath.getFullPath(ShardingNode.ROOT).length() + 1, path.lastIndexOf(FailoverNode.FAILOVER) - 1)); }
FailoverNode { public Integer getItemByExecutionFailoverPath(final String path) { if (!isFailoverPath(path)) { return null; } return Integer.parseInt(path.substring(jobNodePath.getFullPath(ShardingNode.ROOT).length() + 1, path.lastIndexOf(FailoverNode.FAILOVER) - 1)); } }
FailoverNode { public Integer getItemByExecutionFailoverPath(final String path) { if (!isFailoverPath(path)) { return null; } return Integer.parseInt(path.substring(jobNodePath.getFullPath(ShardingNode.ROOT).length() + 1, path.lastIndexOf(FailoverNode.FAILOVER) - 1)); } FailoverNode(final String jobName); }
FailoverNode { public Integer getItemByExecutionFailoverPath(final String path) { if (!isFailoverPath(path)) { return null; } return Integer.parseInt(path.substring(jobNodePath.getFullPath(ShardingNode.ROOT).length() + 1, path.lastIndexOf(FailoverNode.FAILOVER) - 1)); } FailoverNode(final String jobName); Integer getItemByExecutionFailoverPath(final String path); }
FailoverNode { public Integer getItemByExecutionFailoverPath(final String path) { if (!isFailoverPath(path)) { return null; } return Integer.parseInt(path.substring(jobNodePath.getFullPath(ShardingNode.ROOT).length() + 1, path.lastIndexOf(FailoverNode.FAILOVER) - 1)); } FailoverNode(final String jobName); Integer getItemByExecutionFailoverPath(final String path);  }