public static long next(final String name){
        String id = null;
        try{
            id = Locks.lockEntityQuite(new StorageId(NumberSequence.class, null, null, name), 30, TimeUnit.SECONDS);
            long l = getLocalStorage().read(name);
            l++;
            DDSCluster.call(new MessageBean(NumberSequence.class, null, null, name, "set",
                    Objects.newHashMap(String.class, Object.class, "value", l)));
            return l;
        }finally {
            Locks.releaseLock(id);
        }
    }
public static long next ( final String name ) { String id = null ; try { id = Locks . lockEntityQuite ( new StorageId ( NumberSequence . class , null , null , name ) , 30 , TimeUnit . SECONDS ) ; long l = getLocalStorage ( ) . read ( name ) ; l ++ ; DDSCluster . call ( new MessageBean ( NumberSequence . class , null , null , name , "set" , Objects . newHashMap ( String . class , Object . class , "value" , l ) ) ) ; return l ; } finally { Locks . releaseLock ( id ) ; } }
Get next number from sequence, if sequence is empty, 0L will be returned and sequence will be created

@param name
@return