public class LocalStorageProvider extends Object implements StorageProvider
MemoryCache
,
SynchMemoryCache
StorageProvider.StorageObject
GLOBAL, LOCAL, SESSION
Constructor and Description |
---|
LocalStorageProvider()
Instantiates a new local storage provider.
|
LocalStorageProvider(boolean synch)
Instantiates a new local storage provider.
|
Modifier and Type | Method and Description |
---|---|
Map<String,StorageProvider.StorageObject> |
getProperties()
Gets the properties.
|
Object |
getProperty(String key)
Gets the property.
|
Object |
getProperty(String key,
Object def)
Gets the property.
|
Object |
removeProperty(String key)
Removes the property.
|
Object |
setProperty(String key,
StorageProvider.StorageObject value)
Sets the property.
|
public LocalStorageProvider()
public LocalStorageProvider(boolean synch)
synch
- if true the SynchMemoryCache will be used to store properties, otherwise - MemoryCachepublic Map<String,StorageProvider.StorageObject> getProperties()
StorageProvider
getProperties
in interface StorageProvider
public Object getProperty(String key)
StorageProvider
getProperty
in interface StorageProvider
key
- the keypublic Object getProperty(String key, Object def)
StorageProvider
getProperty
in interface StorageProvider
key
- the keydef
- the defpublic Object removeProperty(String key)
StorageProvider
removeProperty
in interface StorageProvider
key
- the keypublic Object setProperty(String key, StorageProvider.StorageObject value)
StorageProvider
setProperty
in interface StorageProvider
key
- the keyvalue
- the valueCopyright © 2010-2020 Toolsverse. All Rights Reserved.