Interface Space<K,V>
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
LocalSpace<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
- Since:
- 2.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()booleanbooleanTake an entry from the space, waiting forever until one exists.Take an entry from the space, waiting a limited amount of time until one exists.In probe takes an entry from the space if one exists, return null otherwise.voidNrd (not read) waits forever until Key is not present in space.
Resolution for expiring entries is implementation dependant, but a minimum one-second is suggested.Nrd (not read) waits up to timeout until Key is not present in space.
Resolution for expiring entries is implementation dependant, but a minimum one-second is suggested.voidWrite a new entry into the SpacevoidWrite a new entry into the Space, with an timeout valuevoidWrite a new entry at the head of a queue.voidWrite a new entry at the head of the queue with a timeout valuevoidWrite a single entry at the head of the queue discarding the other entriesvoidWrite a single entry at the head of the queue discarding the other entries, with timeout.Read an entry from the space, waiting forever until one exists.Read an entry from the space, waiting a limited amount of time until one exists.Read probe reads an entry from the space if one exists, return null otherwise.
-
Method Details
-
out
-
out
-
in
-
rd
-
in
-
rd
-
inp
-
rdp
-
nrd
-
nrd
-
push
-
push
-
existAny
-
existAny
-
put
-
put
-
close
- Specified by:
closein interfaceAutoCloseable
-