|
![]() |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsunlabs.brazil.template.QueueTemplate.Queue
public static class QueueTemplate.Queue
Create an object queue. "Getters" wait 'till something appears in the queue.
Field Summary | |
---|---|
static int |
max
|
Constructor Summary | |
---|---|
QueueTemplate.Queue()
Create a new Q of a maximum possible size |
Method Summary | |
---|---|
void |
clear()
Clear the queue. |
long |
count()
Return the total number of items Q'd. |
Object |
get(int timeout)
Return the next item on the queue, waiting for up to "timeout" seconds or for an interrupt. |
long |
getCreated()
Return creation time (ms since epoch). |
long |
getExpires()
Get the expiration period of the Queue (in ms). |
int |
getMax()
Maximum Q size |
boolean |
isClosed()
Get the closed state. |
void |
kick()
Send a notify: for debugging |
long |
lastIn()
Return the last time a Q insertion was attempted. |
long |
lastOut()
Return the last time a Q removal was attempted. |
boolean |
put(Object item)
Put an item on the queue if it's open and not full. |
boolean |
put(Object item,
boolean force)
Put an item on the queue if it's not full. |
boolean |
setClosed(boolean closed)
Set the closed state. |
void |
setExpires(long expires)
Set the expiration period of the Queue (in ms). |
int |
size()
How many items are queue'd. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int max
Constructor Detail |
---|
public QueueTemplate.Queue()
Method Detail |
---|
public Object get(int timeout)
public boolean put(Object item)
public boolean put(Object item, boolean force)
public int size()
public int getMax()
public void kick()
public long lastIn()
public long lastOut()
public long count()
public long getExpires()
public void setExpires(long expires)
public long getCreated()
public void clear()
public boolean setClosed(boolean closed)
public boolean isClosed()
public String toString()
toString
in class Object
|
Version Kenai-svn-r24, Generated 08/18/09 Copyright (c) 2001-2009, Sun Microsystems. |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |