public Single < ByteBuf > getSeqnos ( ) { return Single . create ( new Single . OnSubscribe < ByteBuf > ( ) { @ Override public void call ( final SingleSubscriber < ? super ByteBuf > subscriber ) { if ( state ( ) != LifecycleState . CONNECTED ) { subscriber . onError ( new NotConnectedException ( ) ) ; return ; } ByteBuf buffer = Unpooled . buffer ( ) ; DcpGetPartitionSeqnosRequest . init ( buffer ) ; DcpGetPartitionSeqnosRequest . vbucketState ( buffer , VbucketState . ACTIVE ) ; sendRequest ( buffer ) . addListener ( new DcpResponseListener ( ) { @ Override public void operationComplete ( Future < DcpResponse > future ) throws Exception { if ( future . isSuccess ( ) ) { ByteBuf buf = future . getNow ( ) . buffer ( ) ; try { subscriber . onSuccess ( MessageUtil . getContent ( buf ) . copy ( ) ) ; } finally { buf . release ( ) ; } } else { subscriber . onError ( future . cause ( ) ) ; } } } ) ; } } ) ; }
Returns all seqnos for all vbuckets on that channel .