Package org.zkoss.zk.ui.sys
Interface Storage
-
- All Superinterfaces:
java.io.Serializable
public interface Storage extends java.io.Serializable
A storage interface is used for ZK web application to store application data with a string key and a data type value. The implementation class for this interface must be a thread safe that application developer can add, remove, or get the data without dealing with threads.- Since:
- 8.0.0
- Author:
- jumperchen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
getItem(java.lang.String key)
Returns the value from the given key.<T> T
removeItem(java.lang.String key)
Removes the value from the given key, if any.<T> void
setItem(java.lang.String key, T value)
Sets a data value with a given key
-
-
-
Method Detail
-
getItem
<T> T getItem(java.lang.String key)
Returns the value from the given key.
-
setItem
<T> void setItem(java.lang.String key, T value)
Sets a data value with a given key
-
removeItem
<T> T removeItem(java.lang.String key)
Removes the value from the given key, if any.- Returns:
- a removed value or null
-
-