Package org.cyclos.impl.system
Interface ScriptStorageHandler
-
- All Known Implementing Classes:
ScriptStorageHandlerImpl
public interface ScriptStorageHandlerProvides access toObjectParameterStoragestored onScriptStorage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 removedvoidsetAlwaysPersist(boolean alwaysPersist)Only used by tests, if true is setted always persist storages when "get" methods are called.
-
-
-
Method Detail
-
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
-
setAlwaysPersist
void setAlwaysPersist(boolean alwaysPersist)
Only used by tests, if true is setted always persist storages when "get" methods are called.
-
-