Class JDBMSpace<K,V>
java.lang.Object
java.util.TimerTask
org.jpos.space.JDBMSpace<K,V>
- All Implemented Interfaces:
AutoCloseable, Runnable, PersistentSpace, Space<K,V>
JDBM based persistent space implementation
- Since:
- 1.4.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final longprotected jdbm.htree.HTreeprotected Stringprotected jdbm.RecordManagerprotected static final jdbm.helper.Serializer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()close this space - use with carevoidcommit()force commitbooleanbooleanvoidgc()garbage collector.getKeys()static JDBMSpacegetSpace()static JDBMSpacecreates a named JDBMSpace (filename used for storage is the same as the given name)static JDBMSpacecreates a named JDBMSpaceTake an entry from the space, waiting forever until one exists.Take an entry from the space, waiting forever 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 The entry will timeout after the specified periodvoidWrite a new entry into the Space at the head of a queue The entry will timeout after the specified periodvoidWrite a new entry at the head of a queue.voidWrite 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.voidrollback()force rollbackvoidrun()voidsetAutoCommit(boolean b) Use with utmost care and at your own risk.longMethods inherited from class TimerTask
cancel, scheduledExecutionTime
-
Field Details
-
htree
-
recman
-
refSerializer
-
spaceRegistrar
-
autoCommit
-
name
-
GCDELAY
- See Also:
-
-
Constructor Details
-
JDBMSpace
-
-
Method Details
-
getSpace
-
getSpace
-
getSpace
-
setAutoCommit
Use with utmost care and at your own risk. If you are to perform several operations on the space you should synchronize on the space, i.e:synchronized (sp) { sp.setAutoCommit (false); sp.out (..., ...) sp.out (..., ...) ... ... sp.inp (...); sp.commit (); // or sp.rollback (); sp.setAutoCommit (true); }- Parameters:
b- true or false
-
commit
force commit -
rollback
force rollback -
close
-
out
-
out
-
push
-
push
-
rdp
-
inp
-
in
-
in
-
rd
-
rd
-
nrd
Description copied from interface:SpaceNrd (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
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. -
size
-
existAny
-
existAny
-
put
Description copied from interface:SpaceWrite a single entry at the head of the queue discarding the other entries, with timeout. -
put
-
run
-
gc
garbage collector. removes expired entries -
getKeys
-