Package be.business.connector.core.utils
Class PersistentCache
- java.lang.Object
-
- be.business.connector.core.utils.PersistentCache
-
public class PersistentCache extends Object
The Class PersistentCache.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(String keyId)Contains key.byte[]get(String keyId)Gets the key.static PersistentCachegetInstance()Gets the single instance of PersistentCache.voidput(String key, byte[] value)Put the key-value pair in the cache.static StringrewriteKey(String key)Rewrite key.
-
-
-
Method Detail
-
getInstance
public static PersistentCache getInstance()
Gets the single instance of PersistentCache.- Returns:
- single instance of PersistentCache
-
get
public byte[] get(String keyId)
Gets the key.- Parameters:
keyId- the key id- Returns:
- the key
-
containsKey
public boolean containsKey(String keyId)
Contains key.- Parameters:
keyId- the key id- Returns:
- true, if successful
-
put
public void put(String key, byte[] value)
Put the key-value pair in the cache.- Parameters:
key- the key idvalue- the key
-
rewriteKey
public static String rewriteKey(String key)
Rewrite key.- Parameters:
key- the key- Returns:
- the string
-
clear
public void clear()
-
-