public synchronized boolean sendReplyForOneResult(DM dm,PartitionedRegion pr,long startTime,Object oneResult,boolean lastResult,boolean sendResultsInOrder) throws CacheException, ForceReattemptException, InterruptedException {
  if (this.replyLastMsg) {
    return false;
  }
  if (Thread.interrupted())   throw new InterruptedException();
  int msgNum=this.replyMsgNum;
  this.replyLastMsg=lastResult;
  sendReply(getSender(),this.processorId,dm,null,oneResult,pr,startTime,msgNum,lastResult,sendResultsInOrder);
  if (logger.isDebugEnabled()) {
    logger.debug("Sending reply message count: {} to co-ordinating node");
  }
  this.replyMsgNum++;
  return false;
}

public synchronized boolean sendReplyForOneResult ( DM dm , PartitionedRegion pr , long startTime , Object oneResult , boolean lastResult , boolean sendResultsInOrder ) throws CacheException , ForceReattemptException , InterruptedException { if ( this . replyLastMsg ) { return false ; } if ( Thread . interrupted ( ) ) throw new InterruptedException ( ) ; int msgNum = this . replyMsgNum ; this . replyLastMsg = lastResult ; sendReply ( getSender ( ) , this . processorId , dm , null , oneResult , pr , startTime , msgNum , lastResult , sendResultsInOrder ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Sending reply message count: {} to co-ordinating node" ) ; } this . replyMsgNum ++ ; return false ; }
it sends message one by one until it gets lastmessage . have to handle scenario when message is large , in that case message will be broken into chunks and then sent across .
