K
- the cache key typeV
- the cache value typepublic class DistributableCache<K,V extends Identifiable<K>> extends Object implements Cache<K,V>
Cache
implementation.
This object is responsible for:
CURRENT_GROUP
Constructor and Description |
---|
DistributableCache(BeanManager<UUID,K,V> manager,
StatefulObjectFactory<V> factory,
ServerEnvironment environment) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(K id)
Indicates whether or not the specified key is contained within this cache.
|
V |
create()
Creates and caches a new instance of
T . |
K |
createIdentifier() |
void |
discard(K id)
Discard the specified object from cache.
|
V |
get(K id)
Get the specified object from cache.
|
int |
getCacheSize() |
int |
getPassivatedCount() |
org.jboss.ejb.client.Affinity |
getStrictAffinity() |
int |
getTotalSize() |
org.jboss.ejb.client.Affinity |
getWeakAffinity(K id) |
void |
release(V value)
Decreases the objects usage count.
|
void |
remove(K id)
Remove and destroy the specified object from cache.
|
void |
start()
Start the cache.
|
void |
stop()
Stop the cache.
|
public DistributableCache(BeanManager<UUID,K,V> manager, StatefulObjectFactory<V> factory, ServerEnvironment environment)
public org.jboss.ejb.client.Affinity getStrictAffinity()
getStrictAffinity
in interface AffinitySupport<K>
public org.jboss.ejb.client.Affinity getWeakAffinity(K id)
getWeakAffinity
in interface AffinitySupport<K>
public K createIdentifier()
createIdentifier
in interface IdentifierFactory<K>
public V create()
Cache
T
.public V get(K id)
Cache
public void release(V value)
Cache
public void remove(K id)
Cache
public void discard(K id)
Cache
public boolean contains(K id)
Cache
public void start()
Cache
public void stop()
Cache
public int getCacheSize()
getCacheSize
in interface Cache<K,V extends Identifiable<K>>
public int getPassivatedCount()
getPassivatedCount
in interface Cache<K,V extends Identifiable<K>>
public int getTotalSize()
getTotalSize
in interface Cache<K,V extends Identifiable<K>>
Copyright © 2014 JBoss by Red Hat. All rights reserved.