public interface Cache<K extends Serializable,V extends Identifiable<K>> extends Removable<K>, AffinitySupport<K>, IdentifierFactory<K>
Modifier and Type | Method and Description |
---|---|
boolean |
contains(K key) |
V |
create()
Creates and caches a new instance of
T . |
void |
discard(K key)
Discard the specified object from cache.
|
V |
get(K key)
Get the specified object from cache.
|
int |
getCacheSize() |
int |
getPassivatedCount() |
int |
getTotalSize() |
void |
release(V obj)
Decreases the objects usage count.
|
void |
start()
Start the cache.
|
void |
stop()
Stop the cache.
|
getStrictAffinity, getWeakAffinity, hasAffinity
createIdentifier
V create()
T
.T
void discard(K key)
key
- the identifier of the objectV get(K key)
key
- the identifier of the objectboolean contains(K key)
key
- The EJB identifier to checktrue
if the EJB is present in the cachevoid release(V obj)
obj
- the objectvoid start()
void stop()
int getCacheSize()
int getPassivatedCount()
int getTotalSize()
Copyright © 2013 JBoss by Red Hat. All rights reserved.