|
Spring Integration | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.integration.util.UpperBound
public final class UpperBound
Thin wrapper around a Semaphore that allows to create a potentially unlimited upper bound to by used in buffers of messages (e.g. a QueueChannel or a MessageStore).
| Field Summary | |
|---|---|
java.util.concurrent.Semaphore |
semaphore
|
| Constructor Summary | |
|---|---|
UpperBound(int capacity)
Create an UpperBound with the given capacity. |
|
| Method Summary | |
|---|---|
int |
availablePermits()
|
void |
release()
Releases one lock on the underlying semaphore. |
void |
release(int permits)
Releases several locks on the underlying semaphore. |
boolean |
tryAcquire(long timeoutInMilliseconds)
Acquires a permit from the underlying semaphore if this UpperBound is bounded and returns true if it succeeds within the given timeout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final java.util.concurrent.Semaphore semaphore
| Constructor Detail |
|---|
public UpperBound(int capacity)
| Method Detail |
|---|
public int availablePermits()
public boolean tryAcquire(long timeoutInMilliseconds)
public void release()
public void release(int permits)
|
Spring Integration | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||