public void rollback(int taskId){
  ConcurrentLinkedQueue<ReplDBMSEvent> queue=taskQueues.get(taskId);
synchronized (queue) {
    if (queue.size() > 0) {
      queue.clear();
    }
  }
}

public void rollback ( int taskId ) { ConcurrentLinkedQueue < ReplDBMSEvent > queue = taskQueues . get ( taskId ) ; synchronized ( queue ) { if ( queue . size ( ) > 0 ) { queue . clear ( ) ; } } }
rolls back pending events for a particular task .
