|
jPOS 1.6.5 API Documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Space<K,V>
Space uses concepts described in the Linda Coordination Language that eases the implementation of other jPOS components (such as Channels, Muxes, etc.), but it is not by any means an attempt to provide a full implementation.
jPOS's Space is basically a Map where each entry is a LinkedList of values that can be used as a BlockingQueue
One can place entries on a queue by calling Space.out, take them by calling Space.in and read (without taking) by calling Space.rd
LeasedReference,
TransientSpace,
SpaceError,
The Linda Coordination Language| Method Summary | |
|---|---|
boolean |
existAny(K[] keys)
|
boolean |
existAny(K[] keys,
long timeout)
|
V |
in(java.lang.Object key)
Take an entry from the space, waiting forever until one exists. |
V |
in(java.lang.Object key,
long timeout)
Take an entry from the space, waiting a limited amount of time until one exists. |
V |
inp(java.lang.Object key)
In probe takes an entry from the space if one exists, return null otherwise. |
void |
out(K key,
V value)
Write a new entry into the Space |
void |
out(K key,
V value,
long timeout)
Write a new entry into the Space, with an timeout value |
void |
push(K key,
V value)
Write a new entry at the head of a queue. |
void |
push(K key,
V value,
long timeout)
Write a new entry at the head of the queue with a timeout value |
V |
rd(java.lang.Object key)
Read an entry from the space, waiting forever until one exists. |
V |
rd(java.lang.Object key,
long timeout)
Read an entry from the space, waiting a limited amount of time until one exists. |
V |
rdp(java.lang.Object key)
Read probe reads an entry from the space if one exists, return null otherwise. |
| Method Detail |
|---|
void out(K key,
V value)
key - Entry's keyvalue - Object value
void out(K key,
V value,
long timeout)
key - Entry's keyvalue - Object valuetimeout - timeout valueV in(java.lang.Object key)
key - Entry's key
V rd(java.lang.Object key)
key - Entry's key
V in(java.lang.Object key,
long timeout)
key - Entry's keytimeout - millis to wait
V rd(java.lang.Object key,
long timeout)
key - Entry's keytimeout - millis to wait
V inp(java.lang.Object key)
key - Entry's key
V rdp(java.lang.Object key)
key - Entry's key
void push(K key,
V value)
key - Entry's keyvalue - Object value
void push(K key,
V value,
long timeout)
key - Entry's keyvalue - Object valuetimeout - timeout valueboolean existAny(K[] keys)
keys - array of keys to check
boolean existAny(K[] keys,
long timeout)
keys - array of keys to checktimeout - to wait for any of the entries to become available
|
jPOS.org | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||