NetKernel APIs


com.ten60.netkernel.scheduler
Class PendingRequestMap

java.lang.Object
  extended bycom.ten60.netkernel.scheduler.PendingRequestMap

public final class PendingRequestMap
extends Object

A Map of pending request states tied to child requests.


Constructor Summary
PendingRequestMap()
           
 
Method Summary
 RequestState get(URRequest aRequest)
           
 RequestState getNewestStateForSession(IRequestorSession aSession)
           
 URRequest getRootRequestForSession(IRequestorSession aSession)
           
 boolean hasEquivalentInProgress(RequestState aState)
           
 boolean kill(IRequestorSession aSession, Map aStateToThreadMap, RequestTable aTable, boolean aOrphan, String aErrorId)
          Attempt to terminate execution of a session- this will either attempt to kill thread running request or force an orphaned response if asynch session has failed to return a response in error
 void notifyOfAvailableResult(RequestState aState, RequestTable aTable)
           
 void put(URRequest aRequest, RequestState aState)
           
 RequestState remove(URRequest aRequest)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PendingRequestMap

public PendingRequestMap()
Method Detail

put

public void put(URRequest aRequest,
                RequestState aState)

remove

public RequestState remove(URRequest aRequest)

get

public RequestState get(URRequest aRequest)

size

public int size()

hasEquivalentInProgress

public boolean hasEquivalentInProgress(RequestState aState)

notifyOfAvailableResult

public void notifyOfAvailableResult(RequestState aState,
                                    RequestTable aTable)

getNewestStateForSession

public RequestState getNewestStateForSession(IRequestorSession aSession)

getRootRequestForSession

public URRequest getRootRequestForSession(IRequestorSession aSession)

kill

public boolean kill(IRequestorSession aSession,
                    Map aStateToThreadMap,
                    RequestTable aTable,
                    boolean aOrphan,
                    String aErrorId)
Attempt to terminate execution of a session- this will either attempt to kill thread running request or force an orphaned response if asynch session has failed to return a response in error

Parameters:
aSession - the session to kill
aStateToThreadMap - the map to lookup possible thread associated with request
aTable - the table of pending requests for a session
aOrphan - if true a dummy response will be returned if no thread is found for request, otherwise nothing will happen
aErrorId - the error id that failing request will throw
Returns:
true if the session was satisfactorily killed

NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.