private static long getSequenceNumber(String node) {
    final int length = node.length();
    try {
      String seqNumStr = node.substring(length - 10, length);
      return Long.valueOf(seqNumStr);
    } catch (IndexOutOfBoundsException | NumberFormatException ex) {
      throw new IllegalArgumentException(String.format("znode %s doesn't have sequence number", node));
    }
  }
private static long getSequenceNumber(String node) {
    final int length = node.length();
    try {
      String seqNumStr = node.substring(length - 10, length);
      return Long.valueOf(seqNumStr);
    } catch (IndexOutOfBoundsException | NumberFormatException ex) {
      throw new IllegalArgumentException(String.format("znode %s doesn't have sequence number", node));
    }
  }
private static long getSequenceNumber ( String node ) { final int length = node . length ( ) ; try { String seqNumStr = node . substring ( length - 10 , length ) ; return Long . valueOf ( seqNumStr ) ; } catch ( IndexOutOfBoundsException | NumberFormatException ex ) { throw new IllegalArgumentException ( String . format ( "znode %s doesn't have sequence number" , node ) ) ; } }
Gets 10 digit sequence number from the given znode per:
http://zookeeper.apache.org/doc/trunk/zookeeperProgrammers.html#Sequence+Nodes+--+Unique+Naming
Gets 10 digit sequence number from the given znode per : http : // zookeeper . apache . org / doc / trunk / zookeeperProgrammers . html#Sequence + Nodes + -- + Unique + Naming