SpaceUtil
In SpaceUtil we put together general purpose helper methods that can be used with any Space implementation.
-
inpAll pulls all entries under a given key and return them in an array.
-
wipe remove all entries under a given key
-
nextLong When used in combination with a persistent Space (such as
JDBMSpace
orJESpace
), this method can be used to easily implement sequencers, e.g.:
import org.jpos.space.*;
Space sp = SpaceFactory.getSpace("je:sequencers");
long l = SpaceUtil.nextLong(sp, "traceno");
Regularly monitor this class, as we may add new helper methods in the future. :::