Package org.cyclos.impl.system
Interface ScriptStorageHandler
-
public interface ScriptStorageHandlerProvides access toObjectParameterStoragestored onScriptStorage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddetach(String key)Detaches the given storage from the current transaction, discarding changes.booleanexists(String key)Returns whether the given key represents a valid storageScriptObjectStorageget(String key)Returns a storage by key with no expiration, updating an existing or creating a new one.ScriptObjectStorageget(String key, Integer timeoutInSeconds)Returns a storage by key, updating an existing one with the given timeout if needed, or creating a new oneScriptObjectStoragegetIfValid(String key)Returns a storage by key if it exists and is not expired, returning null otherwisebooleanremove(String key)Removes an storage by key, returning whether something was really removed
-
-
-
Method Detail
-
detach
void detach(String key)
Detaches the given storage from the current transaction, discarding changes. Any call to get() will re-read from the database. No-op if the storage with the given key is not attached to the current transaction.
-
exists
boolean exists(String key)
Returns whether the given key represents a valid storage
-
get
ScriptObjectStorage get(String key)
Returns a storage by key with no expiration, updating an existing or creating a new one. Equivalent to get(key, null)
-
get
ScriptObjectStorage get(String key, Integer timeoutInSeconds)
Returns a storage by key, updating an existing one with the given timeout if needed, or creating a new one
-
getIfValid
ScriptObjectStorage getIfValid(String key)
Returns a storage by key if it exists and is not expired, returning null otherwise
-
remove
boolean remove(String key)
Removes an storage by key, returning whether something was really removed
-
-