@Deprecated
public interface CacheService
Modifier and Type | Field and Description |
---|---|
static int |
CACHE_SIZE
Deprecated.
The default size of a cache.
|
static int |
DEFAULT
Deprecated.
Indicates to create a default cache.
|
static int |
IN_MEMORY
Deprecated.
Indicates to cache data in memory only.
|
static int |
PERSISTENCE_ON_DISK
Deprecated.
Indicates to cache data on disk.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(int cacheID,
java.lang.Object key,
java.lang.Object element)
Deprecated.
Adds the specified element to the selected cache.
|
void |
clearAllCaches()
Deprecated.
Clears all the caches.
|
void |
clearCache(int cacheID)
Deprecated.
Clears the specified cache.
|
int |
createCache()
Deprecated.
Creates a default cache.
|
int |
createCache(int type)
Deprecated.
Creates a cache of a given type.
|
int |
createCache(int type,
int size)
Deprecated.
Creates a cache of a given type.
|
java.lang.Object |
getElement(int cacheID,
java.lang.Object key)
Deprecated.
Adds the specified element to the selected cache.
|
void |
removeCache(int cacheID)
Deprecated.
Removes the cache corresponding to the passed id.
|
void |
setCacheEntries(int cacheID,
int entries)
Deprecated.
Resets the number of items in memory of the cache,
when a new cache is created or deleted.
|
void |
shutDown()
Deprecated.
Shuts the cache down.
|
static final int DEFAULT
static final int PERSISTENCE_ON_DISK
static final int IN_MEMORY
static final int CACHE_SIZE
int createCache()
int createCache(int type, int size)
type
- The type of cache to create.size
- The size of the cache.int createCache(int type)
type
- The type of cache to create.void removeCache(int cacheID)
cacheID
- The id of the cache.void addElement(int cacheID, java.lang.Object key, java.lang.Object element)
cacheID
- The id of the cache.key
- The key corresponding to the element to add.element
- The element to add.java.lang.Object getElement(int cacheID, java.lang.Object key)
cacheID
- The id of the cache.key
- The key corresponding to the element to add.void clearCache(int cacheID)
cacheID
- The id of the cache to clear.void setCacheEntries(int cacheID, int entries)
cacheID
- The id of the cache.entries
- The number of entries.void clearAllCaches()
void shutDown()