Class SpaceUtil
java.lang.Object
org.jpos.space.SpaceUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object[]return all entries under a given keystatic longAtomically increments and returns the long counter stored underkey.static booleanoutIfEmpty(Space sp, Object key, Object value, long nrdTimeout, long outTimeout) Writesvalueonly when the slot atkeyis empty after annrdprobe.static voidoutWhenEmpty(Space sp, Object key, Object value) Blocks until the slot atkeyis empty, then writesvalue.static voidoutWhenEmpty(Space sp, Object key, Object value, long timeout) Blocks until the slot atkeyis empty, then writesvaluewith the given lifespan.static voidRemove all entries under keystatic voidwipeAndOut(Space sp, Object key, Object value) Deprecated.Use space.put insteadstatic voidwipeAndOut(Space sp, Object key, Object value, long timeout) Deprecated.use space.put instead
-
Constructor Details
-
SpaceUtil
public SpaceUtil()Default constructor; no instance state to initialise.
-
-
Method Details
-
inpAll
-
wipe
-
wipeAndOut
Deprecated.Use space.put instead- Parameters:
sp- the Spacekey- entry's keyvalue- entry's value
-
wipeAndOut
Deprecated.use space.put instead- Parameters:
sp- the Spacekey- entry's keyvalue- entry's valuetimeout- entry lifespan in milliseconds
-
nextLong
-
outIfEmpty
public static boolean outIfEmpty(Space sp, Object key, Object value, long nrdTimeout, long outTimeout) Writesvalueonly when the slot atkeyis empty after annrdprobe.- Parameters:
sp- the Spacekey- entry's keyvalue- entry's valuenrdTimeout- how longnrdwaits for the slot to become non-emptyoutTimeout- entry lifespan once written- Returns:
trueif the value was written,falseif the slot was already populated
-
outWhenEmpty
Blocks until the slot atkeyis empty, then writesvaluewith the given lifespan.- Parameters:
sp- the Spacekey- entry's keyvalue- entry's valuetimeout- entry lifespan once written
-
outWhenEmpty
Blocks until the slot atkeyis empty, then writesvalue.- Parameters:
sp- the Spacekey- entry's keyvalue- entry's value
-