aim4.im.v2i.RequestHandler
Class BatchModeRequestHandler

java.lang.Object
  extended by aim4.im.v2i.RequestHandler.BatchModeRequestHandler
All Implemented Interfaces:
RequestHandler

public class BatchModeRequestHandler
extends Object
implements RequestHandler

The batch mode request handler.


Nested Class Summary
static class BatchModeRequestHandler.IndexedProposal
          A proposal with a unique ID.
static class BatchModeRequestHandler.RequestStatCollector
          The Request statistic collector.
 
Constructor Summary
BatchModeRequestHandler(ReorderingStrategy reorderingStrategy)
          Create a batch mode request handler.
BatchModeRequestHandler(ReorderingStrategy reorderingStrategy, BatchModeRequestHandler.RequestStatCollector requestSC)
          Create a batch mode request handler.
 
Method Summary
 void act(double timeStep)
          Let the request handler to act for a given time period.
 StatCollector<?> getStatCollector()
          Get the statistic collector.
 void printQueue()
          Print the queue.
 void processRequestMsg(Request msg)
          Process the request message.
 void setBasePolicyCallback(BasePolicyCallback basePolicy)
          Set the base policy call-back.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchModeRequestHandler

public BatchModeRequestHandler(ReorderingStrategy reorderingStrategy)
Create a batch mode request handler.

Parameters:
reorderingStrategy - the reorder strategy

BatchModeRequestHandler

public BatchModeRequestHandler(ReorderingStrategy reorderingStrategy,
                               BatchModeRequestHandler.RequestStatCollector requestSC)
Create a batch mode request handler.

Parameters:
reorderingStrategy - the reorder strategy
requestSC - the request statistic collector
Method Detail

setBasePolicyCallback

public void setBasePolicyCallback(BasePolicyCallback basePolicy)
Set the base policy call-back.

Specified by:
setBasePolicyCallback in interface RequestHandler
Parameters:
basePolicy - the base policy's call-back

act

public void act(double timeStep)
Let the request handler to act for a given time period.

Specified by:
act in interface RequestHandler
Parameters:
timeStep - the time period

processRequestMsg

public void processRequestMsg(Request msg)
Process the request message.

Specified by:
processRequestMsg in interface RequestHandler
Parameters:
msg - the request message

getStatCollector

public StatCollector<?> getStatCollector()
Get the statistic collector.

Specified by:
getStatCollector in interface RequestHandler
Returns:
the statistic collector

printQueue

public void printQueue()
Print the queue.



Copyright © 2011. All Rights Reserved.