|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.utils.BlockingStack
public class BlockingStack
A simple FILO stack that has MIN/MAX capacity and that blocks if either push/pop would result in violation of these limits. Default values for min/max are 0/infinite
| Method Summary | |
|---|---|
boolean |
empty()
|
int |
getMaxSize()
|
int |
getMinSize()
|
Object |
nonBlockingPop()
Regular, non-blocking pop |
boolean |
nonBlockingPush(Object o)
Regular, non-blocking push. |
Object |
pop()
Remove object from the top of the stack |
void |
push(Object o)
Add new object to the top of the stack |
boolean |
remove(Object o)
Find and remove a specific object from the stack |
void |
setLimits(int max,
int min)
Set the stack limits. |
void |
setMaxSize(int max)
|
void |
setMinSize(int min)
|
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean empty()
public void push(Object o)
throws InterruptedException
o - object to be placed on the stack
InterruptedException
public Object pop()
throws InterruptedException
InterruptedException - if the wait was interrupted
public Object nonBlockingPop()
throws EmptyStackException
EmptyStackExceptionpublic boolean nonBlockingPush(Object o)
public void setLimits(int max,
int min)
public boolean remove(Object o)
public int getMaxSize()
public int getMinSize()
public void setMaxSize(int max)
public void setMinSize(int min)
public int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||