org.curjent.impl.agent
Class Stats

java.lang.Object
  extended by org.curjent.impl.agent.Stats
All Implemented Interfaces:
AgentStats

final class Stats
extends Object
implements AgentStats

Snapshot of agent statistics.


Field Summary
private  int acceptedCapacity
           
private  int currentAccepted
           
private  int currentExecuting
           
private  int currentPending
           
private  long deadcheckTimeout
           
private  TimeUnit deadcheckUnit
           
private  int pendingCapacity
           
private  long pendingTimeout
           
private  TimeUnit pendingUnit
           
 
Constructor Summary
Stats(Messages messages)
          Assumes constructed within the agent's synchronized context.
 
Method Summary
 int getAcceptedCapacity()
          Returns the maximum number of messages the agent will immediately queue for processing.
 int getCurrentAccepted()
          Returns the number of messages currently accepted by the agent.
 int getCurrentExecuting()
          Returns the number of messages the agent is currently executing.
 int getCurrentPending()
          Returns the number of callers currently suspended by the agent.
 long getDeadcheckTimeout()
          Returns the length of time synchronous calls wait before checking if the caller's thread has deadlocked.
 TimeUnit getDeadcheckTimeoutUnit()
          Returns the deadlock check timeout unit.
 int getPendingCapacity()
          Returns the maximum number of callers the agent can suspend while waiting for new messages to be accepted.
 long getPendingTimeout()
          Returns the length of time the caller will wait for the agent to accept a new message.
 TimeUnit getPendingTimeoutUnit()
          Returns the pending timeout unit.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

acceptedCapacity

private final int acceptedCapacity

currentAccepted

private final int currentAccepted

pendingCapacity

private final int pendingCapacity

pendingTimeout

private final long pendingTimeout

pendingUnit

private final TimeUnit pendingUnit

currentPending

private final int currentPending

currentExecuting

private final int currentExecuting

deadcheckTimeout

private final long deadcheckTimeout

deadcheckUnit

private final TimeUnit deadcheckUnit
Constructor Detail

Stats

Stats(Messages messages)
Assumes constructed within the agent's synchronized context.

Method Detail

getAcceptedCapacity

public int getAcceptedCapacity()
Description copied from interface: AgentStats
Returns the maximum number of messages the agent will immediately queue for processing.

Specified by:
getAcceptedCapacity in interface AgentStats
See Also:
Capacity

getCurrentAccepted

public int getCurrentAccepted()
Description copied from interface: AgentStats
Returns the number of messages currently accepted by the agent. This number includes both queued messages and messages currently executing.

Specified by:
getCurrentAccepted in interface AgentStats

getPendingCapacity

public int getPendingCapacity()
Description copied from interface: AgentStats
Returns the maximum number of callers the agent can suspend while waiting for new messages to be accepted.

Specified by:
getPendingCapacity in interface AgentStats
See Also:
Capacity

getPendingTimeout

public long getPendingTimeout()
Description copied from interface: AgentStats
Returns the length of time the caller will wait for the agent to accept a new message.

Specified by:
getPendingTimeout in interface AgentStats
See Also:
Capacity

getPendingTimeoutUnit

public TimeUnit getPendingTimeoutUnit()
Description copied from interface: AgentStats
Returns the pending timeout unit.

Specified by:
getPendingTimeoutUnit in interface AgentStats
See Also:
Capacity

getCurrentPending

public int getCurrentPending()
Description copied from interface: AgentStats
Returns the number of callers currently suspended by the agent.

Specified by:
getCurrentPending in interface AgentStats
See Also:
Capacity

getCurrentExecuting

public int getCurrentExecuting()
Description copied from interface: AgentStats
Returns the number of messages the agent is currently executing.

Specified by:
getCurrentExecuting in interface AgentStats

getDeadcheckTimeout

public long getDeadcheckTimeout()
Description copied from interface: AgentStats
Returns the length of time synchronous calls wait before checking if the caller's thread has deadlocked.

Specified by:
getDeadcheckTimeout in interface AgentStats
See Also:
AgentConfig.setDeadcheckTimeout(long, TimeUnit)

getDeadcheckTimeoutUnit

public TimeUnit getDeadcheckTimeoutUnit()
Description copied from interface: AgentStats
Returns the deadlock check timeout unit.

Specified by:
getDeadcheckTimeoutUnit in interface AgentStats
See Also:
AgentConfig.setDeadcheckTimeout(long, TimeUnit)

toString

public String toString()
Overrides:
toString in class Object


Copyright 2009-2011 Tom Landon
Apache License 2.0