org.jppf.utils
Class QueueStats

java.lang.Object
  extended by org.jppf.utils.QueueStats
All Implemented Interfaces:
Serializable

public class QueueStats
extends Object
implements Serializable

Instances of this class represent statistics for the content of a queue.

Author:
Laurent Cohen
See Also:
Serialized Form

Field Summary
 String title
          Title for this queue snapshot, used in the toString() method.
 
Constructor Summary
QueueStats(String title)
          Initialize this time snapshot with a specified title.
 
Method Summary
 int getMaxQueueSize()
          Get the maximum size of the queue.
 int getQueueSize()
          Get the current size of the queue.
 TimeSnapshot getTimes()
          Get the time snapshot.
 String getTitle()
          Get the title.
 int getTotalQueued()
          Get the total number of objects that have been queued.
 QueueStats makeCopy()
          Male a copy of this queue stats object.
 void setMaxQueueSize(int maxQueueSize)
          Set the maximum size of the queue.
 void setQueueSize(int queueSize)
          Set the current size of the queue.
 void setTimes(TimeSnapshot times)
          Set the time snapshot.
 void setTotalQueued(int totalQueued)
          Set the total number of objects that have been queued.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

title

public String title
Title for this queue snapshot, used in the toString() method.

Constructor Detail

QueueStats

public QueueStats(String title)
Initialize this time snapshot with a specified title.

Parameters:
title - the title for this snapshot.
Method Detail

getTotalQueued

public int getTotalQueued()
Get the total number of objects that have been queued.

Returns:
the number of objects as an int.

setTotalQueued

public void setTotalQueued(int totalQueued)
Set the total number of objects that have been queued.

Parameters:
totalQueued - the number of objects as an int.

getQueueSize

public int getQueueSize()
Get the current size of the queue.

Returns:
the queue size as an int.

setQueueSize

public void setQueueSize(int queueSize)
Set the current size of the queue.

Parameters:
queueSize - the queue size as an int.

getMaxQueueSize

public int getMaxQueueSize()
Get the maximum size of the queue.

Returns:
the maximum queue size as an int.

setMaxQueueSize

public void setMaxQueueSize(int maxQueueSize)
Set the maximum size of the queue.

Parameters:
maxQueueSize - the maximum queue size as an int.

getTimes

public TimeSnapshot getTimes()
Get the time snapshot.

Returns:
a TimeSnapshot instance.

setTimes

public void setTimes(TimeSnapshot times)
Set the time snapshot.

Parameters:
times - a TimeSnapshot instance.

getTitle

public String getTitle()
Get the title.

Returns:
the title string.

toString

public String toString()

Overrides:
toString in class Object

makeCopy

public QueueStats makeCopy()
Male a copy of this queue stats object.

Returns:
a QueueStats instance.


Copyright © 2005-2010 JPPF Team.