|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.edg.info.InstanceBase
org.edg.info.ConsumerInstance
The "agent" that serves the Consumer. This class holds state on behalf of the Consumer and contains methods that correspond to the Consumer API. The ConsumerServlet acts as a mediator between the Consumer and ConsumerInstance.
Field Summary |
Fields inherited from class org.edg.info.InstanceBase |
DEFAULT_TERMINATION_INTERVAL_MS, s_maxTerminationInterval, s_minTerminationInterval |
Method Summary | |
void |
abort()
Aborts the query. |
boolean |
canPop()
Method canPop() checks if any tuples can be popped. |
int |
count()
Returns the number of stored tuples. |
void |
destroy()
XXX-AC: note, this is called from a syncrhonized block in the instanceTracker. |
abstract void |
flushQueue(java.lang.String queueName,
java.lang.String host)
|
java.lang.String |
getClientHostName()
|
Message |
getCurrentMessageInFastQueue()
|
Message |
getCurrentMessageInSlowQueue()
|
long |
getLastPopTimeMillis()
|
Message[] |
getMessagesInFastQueue()
|
Message[] |
getMessagesInSlowQueue()
|
int |
getNumTuplesInStore()
|
org.glite.rgma.system.ProducerTableEntryList |
getProducerTableEntryList()
|
java.lang.String |
getQuery()
|
org.glite.rgma.system.QueryProperties |
getQueryProperties()
|
java.lang.String[] |
getTableNames()
|
boolean |
hasAborted()
Returns a ResultSet containing the state of the aborted flag. |
void |
incCompletedExecutes()
|
abstract boolean |
isExecuting()
Returns the current status of the executing threads. |
org.glite.rgma.system.ResultSet |
pop()
Attempts to pop the number of tuples of the stack. |
org.glite.rgma.system.ResultSet |
pop(int maxNumTuples)
Attempts to pop the number of tuples off the stack. |
void |
setClientHostName(java.lang.String remoteHostName)
Sets the client hostname that previously contacted this resource. |
abstract void |
setProducerConnections(java.util.Vector servletConnections)
Sets the list of producer connections for this Consumer to contact and sets isGlobalQuery to false . |
void |
start(long timeout)
Will start executing each request. |
void |
start(long timeout,
java.util.Vector servletConnections)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public abstract boolean isExecuting() throws org.glite.rgma.system.RGMAUserException
true
if any threads are still executing a query,
false
otherwise.
org.glite.rgma.system.RGMAException
- if the API has been closed or is disconnected.
org.glite.rgma.system.RGMAUserException
public void abort() throws org.glite.rgma.system.RGMAUserException, org.glite.rgma.system.RGMAInternalException
org.glite.rgma.system.RGMAException
- if unable to process the request.
org.glite.rgma.system.RGMAUserException
org.glite.rgma.system.RGMAInternalException
public boolean canPop() throws org.glite.rgma.system.RGMAUserException
org.glite.rgma.system.RGMAException
- Thrown if not connected or by count()
org.glite.rgma.system.RGMAUserException
public void destroy()
org.edg.info.InstanceBase#destroy().
public int count() throws org.glite.rgma.system.RGMAUserException
org.glite.rgma.system.RGMAException
- if this InstanceBase Object has been closed.
org.glite.rgma.system.RGMAUserException
public boolean hasAborted() throws org.glite.rgma.system.RGMAUserException
org.glite.rgma.system.RGMAException
- if Object has been closed.
org.glite.rgma.system.RGMAUserException
public org.glite.rgma.system.ResultSet pop() throws org.glite.rgma.system.RGMAUserException
org.glite.rgma.system.RGMAException
- Thrown if not connected, in invalid state or by
QueueManager.pop().
org.glite.rgma.system.RGMAUserException
public org.glite.rgma.system.ResultSet pop(int maxNumTuples) throws org.glite.rgma.system.RGMAUserException
maxNumTuples
- Must be >= 0.
org.glite.rgma.system.RGMAException
- Thrown if not connected, in invalid state or by
QueueManager.pop().
org.glite.rgma.system.RGMAUserException
public void start(long timeout) throws org.glite.rgma.system.RGMAUserException, org.glite.rgma.system.RGMAInternalException
timeout
- period (in ms) when the start will be aborted. If this is 0 the
start will run indefinately.
org.glite.rgma.system.RGMAException
- Thrown if not connected, already executing,
timeout is less than zero or by startXQuery().
org.glite.rgma.system.RGMAUserException
org.glite.rgma.system.RGMAInternalException
public void incCompletedExecutes()
public abstract void flushQueue(java.lang.String queueName, java.lang.String host)
queueName
- host
- public abstract void setProducerConnections(java.util.Vector servletConnections)
false
.
servletConnections
- Vector of ServletConnection objects.public void start(long timeout, java.util.Vector servletConnections) throws org.glite.rgma.system.RGMAUserException, org.glite.rgma.system.RGMAInternalException
timeout
- servletConnections
-
org.glite.rgma.system.RGMAException
org.glite.rgma.system.RGMAUserException
org.glite.rgma.system.RGMAInternalException
public java.lang.String getQuery()
public org.glite.rgma.system.QueryProperties getQueryProperties()
public int getNumTuplesInStore()
public long getLastPopTimeMillis()
public java.lang.String getClientHostName()
public void setClientHostName(java.lang.String remoteHostName)
public java.lang.String[] getTableNames()
public org.glite.rgma.system.ProducerTableEntryList getProducerTableEntryList()
public Message[] getMessagesInFastQueue()
public Message[] getMessagesInSlowQueue()
public Message getCurrentMessageInFastQueue()
public Message getCurrentMessageInSlowQueue()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |