@Test public void testFromShardIdString() { String shardIdStr = "member-1-shard-inventory-config"; ShardIdentifier id = ShardIdentifier.fromShardIdString(shardIdStr); assertEquals("member-1", id.getMemberName().getName()); assertEquals("inventory", id.getShardName()); assertEquals("config", id.getType()); }
public static ShardIdentifier fromShardIdString(final String shardIdString) { final Matcher matcher = PATTERN.matcher(shardIdString); checkArgument(matcher.matches(), "Invalid shard id \"%s\"", shardIdString); return new ShardIdentifier(matcher.group(2), MemberName.forName(matcher.group(1)), matcher.group(3)); }
ShardIdentifier { public static ShardIdentifier fromShardIdString(final String shardIdString) { final Matcher matcher = PATTERN.matcher(shardIdString); checkArgument(matcher.matches(), "Invalid shard id \"%s\"", shardIdString); return new ShardIdentifier(matcher.group(2), MemberName.forName(matcher.group(1)), matcher.group(3)); } }
ShardIdentifier { public static ShardIdentifier fromShardIdString(final String shardIdString) { final Matcher matcher = PATTERN.matcher(shardIdString); checkArgument(matcher.matches(), "Invalid shard id \"%s\"", shardIdString); return new ShardIdentifier(matcher.group(2), MemberName.forName(matcher.group(1)), matcher.group(3)); } ShardIdentifier(final String shardName, final MemberName memberName, final String type); }
ShardIdentifier { public static ShardIdentifier fromShardIdString(final String shardIdString) { final Matcher matcher = PATTERN.matcher(shardIdString); checkArgument(matcher.matches(), "Invalid shard id \"%s\"", shardIdString); return new ShardIdentifier(matcher.group(2), MemberName.forName(matcher.group(1)), matcher.group(3)); } ShardIdentifier(final String shardName, final MemberName memberName, final String type); static ShardIdentifier create(final String shardName, final MemberName memberName, final String type); static ShardIdentifier fromShardIdString(final String shardIdString); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); String getShardName(); MemberName getMemberName(); String getType(); }
ShardIdentifier { public static ShardIdentifier fromShardIdString(final String shardIdString) { final Matcher matcher = PATTERN.matcher(shardIdString); checkArgument(matcher.matches(), "Invalid shard id \"%s\"", shardIdString); return new ShardIdentifier(matcher.group(2), MemberName.forName(matcher.group(1)), matcher.group(3)); } ShardIdentifier(final String shardName, final MemberName memberName, final String type); static ShardIdentifier create(final String shardName, final MemberName memberName, final String type); static ShardIdentifier fromShardIdString(final String shardIdString); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); String getShardName(); MemberName getMemberName(); String getType();  }