|
jPOS 1.6.7 API Documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.TimerTask
org.jpos.space.TSpace<K,V>
public class TSpace<K,V>
TSpace implementation
| Field Summary | |
|---|---|
static long |
GCDELAY
|
| Constructor Summary | |
|---|---|
TSpace()
|
|
| Method Summary | |
|---|---|
void |
addListener(java.lang.Object key,
SpaceListener listener)
add a SpaceListener associated with a given key |
void |
addListener(java.lang.Object key,
SpaceListener listener,
long timeout)
add a SpaceListener associated with a given key for a given period of time. |
void |
dump(java.io.PrintStream p,
java.lang.String indent)
|
boolean |
existAny(K[] keys)
|
boolean |
existAny(K[] keys,
long timeout)
|
void |
gc()
|
java.util.Map |
getEntries()
unstandard method (required for space replication) - use with care |
java.lang.String |
getKeysAsString()
|
java.util.Set |
getKeySet()
|
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. |
boolean |
isEmpty()
|
void |
notifyListeners(java.lang.Object key,
java.lang.Object value)
|
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 |
void |
put(K key,
V value)
Write a single entry at the head of the queue discarding the other entries |
void |
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(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. |
void |
removeListener(java.lang.Object key,
SpaceListener listener)
removes a SpaceListener associated with a given key |
void |
run()
|
void |
setEntries(java.util.Map entries)
unstandard method (required for space replication) - use with care |
int |
size(java.lang.Object key)
|
| Methods inherited from class java.util.TimerTask |
|---|
cancel, scheduledExecutionTime |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long GCDELAY
| Constructor Detail |
|---|
public TSpace()
| Method Detail |
|---|
public void out(K key,
V value)
Space
out in interface Space<K,V>key - Entry's keyvalue - Object value
public void out(K key,
V value,
long timeout)
Space
out in interface Space<K,V>key - Entry's keyvalue - Object valuetimeout - timeout valuepublic V rdp(java.lang.Object key)
Space
rdp in interface Space<K,V>key - Entry's key
public V inp(java.lang.Object key)
Space
inp in interface Space<K,V>key - Entry's key
public V in(java.lang.Object key)
Space
in in interface Space<K,V>key - Entry's key
public V in(java.lang.Object key,
long timeout)
Space
in in interface Space<K,V>key - Entry's keytimeout - millis to wait
public V rd(java.lang.Object key)
Space
rd in interface Space<K,V>key - Entry's key
public V rd(java.lang.Object key,
long timeout)
Space
rd in interface Space<K,V>key - Entry's keytimeout - millis to wait
public void run()
run in interface java.lang.Runnablerun in class java.util.TimerTaskpublic void gc()
public int size(java.lang.Object key)
size in interface LocalSpace<K,V>
public void addListener(java.lang.Object key,
SpaceListener listener)
LocalSpace
addListener in interface LocalSpace<K,V>key - Entry's keylistener - a SpaceListener
public void addListener(java.lang.Object key,
SpaceListener listener,
long timeout)
LocalSpace
addListener in interface LocalSpace<K,V>key - Entry's keylistener - a SpaceListener
public void removeListener(java.lang.Object key,
SpaceListener listener)
LocalSpace
removeListener in interface LocalSpace<K,V>key - Entry's keylistener - the SpaceListenerpublic boolean isEmpty()
public java.util.Set getKeySet()
getKeySet in interface LocalSpace<K,V>public java.lang.String getKeysAsString()
public void dump(java.io.PrintStream p,
java.lang.String indent)
dump in interface Loggeable
public void notifyListeners(java.lang.Object key,
java.lang.Object value)
public void push(K key,
V value)
Space
push in interface Space<K,V>key - Entry's keyvalue - Object value
public void push(K key,
V value,
long timeout)
Space
push in interface Space<K,V>key - Entry's keyvalue - Object valuetimeout - timeout value
public void put(K key,
V value)
Space
put in interface Space<K,V>key - Entry's keyvalue - Object value
public void put(K key,
V value,
long timeout)
Space
put in interface Space<K,V>key - Entry's keyvalue - Object valuetimeout - timeout valuepublic boolean existAny(K[] keys)
existAny in interface Space<K,V>keys - array of keys to check
public boolean existAny(K[] keys,
long timeout)
existAny in interface Space<K,V>keys - array of keys to checktimeout - to wait for any of the entries to become available
public java.util.Map getEntries()
public void setEntries(java.util.Map entries)
entries - underlying entry map
|
jPOS.org | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||