@ NotNull protected CompletableFuture < R > enqueue ( @ NotNull final Meta meta , @ NotNull final T context ) { State < T , R > state = objectQueue . get ( meta . getOid ( ) ) ; if ( state != null ) { if ( state . future . isCancelled ( ) ) { objectQueue . remove ( meta . getOid ( ) , state ) ; state = null ; } } if ( state == null ) { final State < T , R > newState = new State <> ( meta , context ) ; state = objectQueue . putIfAbsent ( meta . getOid ( ) , newState ) ; if ( state == null ) { state = newState ; stateEnqueue ( true ) ; } } return state . future ; }
This method start send object metadata to server .