|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpos.util.Log
org.jpos.space.JESpace<K,V>
public class JESpace<K,V>
BerkeleyDB Jave Edition based persistent space implementation
| Nested Class Summary | |
|---|---|
static class |
JESpace.GCRef
|
static class |
JESpace.Ref
|
| Field Summary | |
|---|---|
static long |
GC_DELAY
|
| Fields inherited from class org.jpos.util.Log |
|---|
DEBUG, ERROR, FATAL, INFO, logger, realm, TRACE, WARN |
| Constructor Summary | |
|---|---|
JESpace(String name,
String path)
|
|
| Method Summary | |
|---|---|
void |
addListener(Object key,
SpaceListener listener)
add a SpaceListener associated with a given key |
void |
addListener(Object key,
SpaceListener listener,
long timeout)
add a SpaceListener associated with a given key for a given period of time. |
void |
close()
|
void |
dump(PrintStream p,
String indent)
|
boolean |
existAny(Object[] keys)
|
boolean |
existAny(Object[] keys,
long timeout)
|
void |
gc()
|
Set |
getKeySet()
|
static JESpace |
getSpace(String name)
|
static JESpace |
getSpace(String name,
String path)
|
V |
in(Object key)
Take an entry from the space, waiting forever until one exists. |
V |
in(Object key,
long timeout)
Take an entry from the space, waiting a limited amount of time until one exists. |
V |
inp(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 |
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(Object key)
Read an entry from the space, waiting forever until one exists. |
V |
rd(Object key,
long timeout)
Read an entry from the space, waiting a limited amount of time until one exists. |
V |
rdp(Object key)
Read probe reads an entry from the space if one exists, return null otherwise. |
void |
removeListener(Object key,
SpaceListener listener)
removes a SpaceListener associated with a given key |
void |
scheduleGC()
|
int |
size(Object key)
|
| Methods inherited from class org.jpos.util.Log |
|---|
createDebug, createDebug, createError, createError, createFatal, createFatal, createInfo, createInfo, createLogEvent, createLogEvent, createTrace, createTrace, createWarn, createWarn, debug, debug, error, error, fatal, fatal, getLog, getLogger, getRealm, info, info, setLogger, setLogger, setRealm, trace, trace, warn, warn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long GC_DELAY
| Constructor Detail |
|---|
public JESpace(String name,
String path)
throws SpaceError
SpaceError| 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 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 push(K key,
V value)
Space
push in interface Space<K,V>key - Entry's keyvalue - Object valuepublic V rdp(Object key)
Space
rdp in interface Space<K,V>key - Entry's key
public V in(Object key)
Space
in in interface Space<K,V>key - Entry's key
public V in(Object key,
long timeout)
Space
in in interface Space<K,V>key - Entry's keytimeout - millis to wait
public V rd(Object key)
Space
rd in interface Space<K,V>key - Entry's key
public V rd(Object key,
long timeout)
Space
rd in interface Space<K,V>key - Entry's keytimeout - millis to wait
public V inp(Object key)
Space
inp in interface Space<K,V>key - Entry's key
public boolean existAny(Object[] keys)
existAny in interface Space<K,V>keys - array of keys to check
public boolean existAny(Object[] 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 void put(K key,
V value,
long timeout)
Space
put 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 gc()
throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseExceptionpublic void scheduleGC()
public void close()
throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
public static JESpace getSpace(String name,
String path)
public static JESpace getSpace(String name)
public void addListener(Object key,
SpaceListener listener)
LocalSpace
addListener in interface LocalSpace<K,V>key - Entry's keylistener - a SpaceListener
public void addListener(Object key,
SpaceListener listener,
long timeout)
LocalSpace
addListener in interface LocalSpace<K,V>key - Entry's keylistener - a SpaceListener
public void removeListener(Object key,
SpaceListener listener)
LocalSpace
removeListener in interface LocalSpace<K,V>key - Entry's keylistener - the SpaceListenerpublic Set getKeySet()
getKeySet in interface LocalSpace<K,V>public int size(Object key)
size in interface LocalSpace<K,V>
public void dump(PrintStream p,
String indent)
dump in interface Loggeable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||