public List<?> endBatch(){
  List<?> result=null;
  if (operationsBatch.size() > 0) {
    result=doFlush();
  }
  useBatch=false;
  operationsBatch=null;
  return result;
}

public List < ? > endBatch ( ) { List < ? > result = null ; if ( operationsBatch . size ( ) > 0 ) { result = doFlush ( ) ; } useBatch = false ; operationsBatch = null ; return result ; }
after this call , the operations will be imediatelly sent to the remote peer . also calls the flush method if there are any outstanding calls to be sent .
