Class SpaceInterceptor<K,V>
java.lang.Object
org.jpos.space.SpaceInterceptor<K,V>
- Type Parameters:
K- the key typeV- the value type
- All Implemented Interfaces:
AutoCloseable, Space<K,V>
Intercepts space operations.
- Since:
- 1.4.7
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSpaceInterceptor(Space<K, V> sp) Constructs an interceptor wrapping the given space. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if any of the given keys are present in the space.booleanReturns true if any of the given keys become available within the timeout.Take 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.
-
Field Details
-
sp
-
-
Constructor Details
-
SpaceInterceptor
Constructs an interceptor wrapping the given space.- Parameters:
sp- space to delegate to
-
-
Method Details
-
out
-
out
-
push
-
push
-
put
-
put
Description copied from interface:SpaceWrite a single entry at the head of the queue discarding the other entries, with timeout. -
in
-
rd
-
in
-
rd
-
inp
-
rdp
-
nrd
-
nrd
Description copied from interface:SpaceNrd (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. -
existAny
-
existAny
Description copied from interface:SpaceReturns true if any of the given keys become available within the timeout.
-