public class MapDBPropertyStorage<T> extends InMemoryPropertyStorage
propertyNames, propertyStorage
Constructor and Description |
---|
MapDBPropertyStorage(File directoryPath) |
Modifier and Type | Method and Description |
---|---|
void |
cleanStorage()
Delete all the information from the Storage
|
void |
close()
Close the storage Map
|
String |
get(String key)
Get a value for a key in the Map
|
String |
get(String itemId,
String propertyName)
Get the Value for an specific combination of itemId and propertyName
|
Set<String> |
getAvailableProperties()
Properties available in the Map
|
protected String |
getCombinedKey(String itemId,
String propertyName)
Get a combined key from an ItemId and Property Name
|
void |
put(String key,
Object value)
Put a key, value in the storage
|
void |
put(String itemId,
String propertyName,
String propertyValue)
This function store a particular property from the store system, in this case
the key is the combination of the itemId and the propertyName
|
long |
storageSize()
Get the Size of the Storage
|
cleanFilePersistence, flush
public MapDBPropertyStorage(File directoryPath)
public void put(String itemId, String propertyName, String propertyValue)
InMemoryPropertyStorage
put
in interface IPropertyStorage
put
in class InMemoryPropertyStorage
itemId
- Item identifierpropertyName
- property NamepropertyValue
- property Valuepublic String get(String itemId, String propertyName)
InMemoryPropertyStorage
get
in interface IPropertyStorage
get
in class InMemoryPropertyStorage
itemId
- Item identifierpropertyName
- Property Namepublic void put(String key, Object value)
InMemoryPropertyStorage
put
in interface IMapStorage
put
in class InMemoryPropertyStorage
key
- String keyvalue
- value for the keypublic String get(String key)
InMemoryPropertyStorage
get
in interface IMapStorage
get
in class InMemoryPropertyStorage
key
- key to be retrirveprotected String getCombinedKey(String itemId, String propertyName)
InMemoryPropertyStorage
getCombinedKey
in class InMemoryPropertyStorage
itemId
- Item identifierpropertyName
- Property identifierpublic Set<String> getAvailableProperties()
InMemoryPropertyStorage
getAvailableProperties
in class InMemoryPropertyStorage
public long storageSize()
InMemoryPropertyStorage
storageSize
in interface IMapStorage
storageSize
in class InMemoryPropertyStorage
public void close() throws PgatkIOException
InMemoryPropertyStorage
close
in interface IMapStorage
close
in class InMemoryPropertyStorage
PgatkIOException
public void cleanStorage()
IMapStorage
cleanStorage
in interface IMapStorage
cleanStorage
in class InMemoryPropertyStorage
Copyright © 2021. All rights reserved.