Package org.jpos.space
Class SpaceInterceptor<K,V>
- java.lang.Object
-
- org.jpos.space.SpaceInterceptor<K,V>
-
- All Implemented Interfaces:
Space<K,V>
public class SpaceInterceptor<K,V> extends java.lang.Object implements Space<K,V>
Intercepts space operations.- Since:
- 1.4.7
-
-
Constructor Summary
Constructors Constructor Description SpaceInterceptor(Space<K,V> sp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
existAny(K[] keys)
boolean
existAny(K[] keys, long timeout)
V
in(K key)
Take an entry from the space, waiting forever until one exists.V
in(K key, long timeout)
Take an entry from the space, waiting a limited amount of time until one exists.V
inp(K key)
In probe takes an entry from the space if one exists, return null otherwise.void
nrd(K key)
Nrd (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.V
nrd(K key, long timeout)
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.void
out(K key, V value)
Write a new entry into the Spacevoid
out(K key, V value, long timeout)
Write a new entry into the Space, with an timeout valuevoid
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 valuevoid
put(K key, V value)
Write a single entry at the head of the queue discarding the other entriesvoid
put(K key, V value, long timeout)
Write a single entry at the head of the queue discarding the other entries, with timeout.V
rd(K key)
Read an entry from the space, waiting forever until one exists.V
rd(K key, long timeout)
Read an entry from the space, waiting a limited amount of time until one exists.V
rdp(K key)
Read probe reads an entry from the space if one exists, return null otherwise.
-
-
-
Constructor Detail
-
SpaceInterceptor
public SpaceInterceptor(Space<K,V> sp)
-
-
Method Detail
-
out
public void out(K key, V value)
Description copied from interface:Space
Write a new entry into the Space
-
out
public void out(K key, V value, long timeout)
Description copied from interface:Space
Write a new entry into the Space, with an timeout value
-
push
public void push(K key, V value)
Description copied from interface:Space
Write a new entry at the head of a queue.
-
push
public void push(K key, V value, long timeout)
Description copied from interface:Space
Write a new entry at the head of the queue with a timeout value
-
put
public void put(K key, V value)
Description copied from interface:Space
Write a single entry at the head of the queue discarding the other entries
-
put
public void put(K key, V value, long timeout)
Description copied from interface:Space
Write a single entry at the head of the queue discarding the other entries, with timeout.
-
in
public V in(K key)
Description copied from interface:Space
Take an entry from the space, waiting forever until one exists.
-
rd
public V rd(K key)
Description copied from interface:Space
Read an entry from the space, waiting forever until one exists.
-
in
public V in(K key, long timeout)
Description copied from interface:Space
Take an entry from the space, waiting a limited amount of time until one exists.
-
rd
public V rd(K key, long timeout)
Description copied from interface:Space
Read an entry from the space, waiting a limited amount of time until one exists.
-
inp
public V inp(K key)
Description copied from interface:Space
In probe takes an entry from the space if one exists, return null otherwise.
-
rdp
public V rdp(K key)
Description copied from interface:Space
Read probe reads an entry from the space if one exists, return null otherwise.
-
nrd
public void nrd(K key)
Description copied from interface:Space
Nrd (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
public V nrd(K key, long timeout)
Description copied from interface:Space
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.
-
-