|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.cache.search.SearchableCacheImpl<K,V>
public class SearchableCacheImpl<K,V>
Constructor Summary | |
---|---|
SearchableCacheImpl(org.jboss.cache.Cache<K,V> cache,
org.hibernate.search.engine.SearchFactoryImplementor searchFactory)
|
Method Summary | |
---|---|
void |
addCacheListener(Object listener)
Adds a listener to the cache. |
void |
clearData(org.jboss.cache.Fqn<?> fqn)
Removes the keys and properties from a named node. |
void |
clearData(String fqn)
Removes the keys and properties from a named node. |
void |
create()
Lifecycle method that initializes configuration state, the root node, etc. |
CacheQuery |
createQuery(org.apache.lucene.search.Query luceneQuery)
Creates a CacheQuery object from a given Lucene Query. |
CacheQuery |
createQuery(org.apache.lucene.search.Query luceneQuery,
Class... classes)
Creates a CacheQuery object from a Lucene Query and a class array. |
void |
destroy()
Lifecycle method that destroys the cache and removes any interceptors/configuration elements. |
void |
evict(org.jboss.cache.Fqn<?> fqn)
Eviction call that evicts the specified Node from memory. |
void |
evict(org.jboss.cache.Fqn<?> fqn,
boolean recursive)
Eviction call that evicts the specified Node from memory. |
V |
get(org.jboss.cache.Fqn<?> fqn,
K key)
Convenience method that allows for direct access to the data in a Node. |
V |
get(String fqn,
K key)
Convenience method that allows for direct access to the data in a Node. |
Set |
getCacheListeners()
Returns a set of listeners that the cache has. |
org.jboss.cache.CacheStatus |
getCacheStatus()
Gets where the cache currently is its lifecycle transitions. |
org.jboss.cache.config.Configuration |
getConfiguration()
Returns an org.jboss.cache.config.Configuration instance. |
Map |
getData(org.jboss.cache.Fqn<?> fqn)
Retrieves a defensively copied data map of the underlying node. |
org.jboss.cache.InvocationContext |
getInvocationContext()
The current invocation context for the current invocation and cache instance. |
Set |
getKeys(org.jboss.cache.Fqn<?> fqn)
Returns a set of attribute keys for the Fqn. |
Set<K> |
getKeys(String fqn)
Returns a set of attribute keys for the Fqn. |
org.jgroups.Address |
getLocalAddress()
Returns the local address of this cache in a cluster, or null if running in local mode. |
List |
getMembers()
Returns a list of members in the cluster, or null if running in local mode. |
org.jboss.cache.Node |
getNode(org.jboss.cache.Fqn<?> fqn)
A convenience method to retrieve a node directly from the cache. |
org.jboss.cache.Node |
getNode(String fqn)
Gets a node from a String representation of a Fqn |
org.jboss.cache.Region |
getRegion(org.jboss.cache.Fqn<?> fqn,
boolean createIfAbsent)
Retrieves a Region for a given Fqn. |
org.jboss.cache.Node |
getRoot()
Returns an org.jboss.cache.Node instance. |
String |
getVersion()
Returns the version of the cache as a string. |
void |
move(org.jboss.cache.Fqn<?> nodeToMove,
org.jboss.cache.Fqn<?> newParent)
Moves a part of the cache to a different subtree. |
void |
move(String nodeToMove,
String newParent)
Moves a part of the cache to a different subtree. |
V |
put(org.jboss.cache.Fqn<?> fqn,
K key,
V value)
Associates the specified value with the specified key for a Node in this cache. |
void |
put(org.jboss.cache.Fqn<?> fqn,
Map<K,V> data)
Copies all of the mappings from the specified map to a Node. |
V |
put(String fqn,
K key,
V value)
Puts something into the cache with a given Fqn, key and value. |
void |
put(String fqn,
Map<K,V> data)
Puts something into the cache with a given Fqn and Map instance. |
void |
putForExternalRead(org.jboss.cache.Fqn<?> fqn,
K key,
V value)
Under special operating behavior, associates the value with the specified key for a node identified by the Fqn passed in. |
V |
remove(org.jboss.cache.Fqn<?> fqn,
K key)
Moves a part of the cache to a different subtree. |
V |
remove(String fqn,
K key)
Removes something from the cache with a given Fqn and key. |
void |
removeCacheListener(Object listener)
Removes a listener from the cache. |
boolean |
removeNode(org.jboss.cache.Fqn<?> fqn)
Removes a Node indicated by absolute Fqn. |
boolean |
removeNode(String fqn)
Convenience method that takes a string representation of an Fqn. |
boolean |
removeRegion(org.jboss.cache.Fqn<?> fqn)
Removes a region denoted by the Fqn passed in. |
void |
setInvocationContext(org.jboss.cache.InvocationContext ctx)
Sets the passed in InvocationContext as current. |
void |
start()
Lifecycle method that starts the cache loader, starts cache replication, starts the region manager, etc., and (if configured) warms the cache using a state transfer or cache loader preload. |
void |
stop()
Lifecycle method that stops the cache, including replication, clustering, cache loading, notifications, etc., and clears all cache in-memory state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SearchableCacheImpl(org.jboss.cache.Cache<K,V> cache, org.hibernate.search.engine.SearchFactoryImplementor searchFactory)
Method Detail |
---|
public CacheQuery createQuery(org.apache.lucene.search.Query luceneQuery)
createQuery
in interface SearchableCache<K,V>
luceneQuery
- - for lucene
public CacheQuery createQuery(org.apache.lucene.search.Query luceneQuery, Class... classes)
createQuery
in interface SearchableCache<K,V>
luceneQuery
- - for luceneclasses
- array
public org.jboss.cache.config.Configuration getConfiguration()
getConfiguration
in interface org.jboss.cache.Cache<K,V>
public org.jboss.cache.Node getRoot()
getRoot
in interface org.jboss.cache.Cache<K,V>
public void addCacheListener(Object listener)
addCacheListener
in interface org.jboss.cache.Cache<K,V>
listener
- public void removeCacheListener(Object listener)
removeCacheListener
in interface org.jboss.cache.Cache<K,V>
listener
- public Set getCacheListeners()
getCacheListeners
in interface org.jboss.cache.Cache<K,V>
public V put(String fqn, K key, V value)
put
in interface org.jboss.cache.Cache<K,V>
fqn
- key
- value
-
public void put(String fqn, Map<K,V> data)
put
in interface org.jboss.cache.Cache<K,V>
fqn
- data
- public V remove(String fqn, K key)
remove
in interface org.jboss.cache.Cache<K,V>
fqn
- key
-
public boolean removeNode(String fqn)
removeNode
in interface org.jboss.cache.Cache<K,V>
fqn
-
public org.jboss.cache.Node getNode(String fqn)
getNode
in interface org.jboss.cache.Cache<K,V>
fqn
-
public V get(String fqn, K key)
get
in interface org.jboss.cache.Cache<K,V>
fqn
- key
-
public void create() throws org.jboss.cache.CacheException
create
in interface org.jboss.cache.Cache<K,V>
org.jboss.cache.CacheException
public void start() throws org.jboss.cache.CacheException
start
in interface org.jboss.cache.Cache<K,V>
org.jboss.cache.CacheException
public void stop()
stop
in interface org.jboss.cache.Cache<K,V>
public void destroy()
destroy
in interface org.jboss.cache.Cache<K,V>
public org.jboss.cache.CacheStatus getCacheStatus()
getCacheStatus
in interface org.jboss.cache.Cache<K,V>
public org.jboss.cache.InvocationContext getInvocationContext()
getInvocationContext
in interface org.jboss.cache.Cache<K,V>
public void setInvocationContext(org.jboss.cache.InvocationContext ctx)
setInvocationContext
in interface org.jboss.cache.Cache<K,V>
ctx
- public org.jgroups.Address getLocalAddress()
getLocalAddress
in interface org.jboss.cache.Cache<K,V>
public List getMembers()
getMembers
in interface org.jboss.cache.Cache<K,V>
public void move(String nodeToMove, String newParent) throws org.jboss.cache.NodeNotExistsException
move
in interface org.jboss.cache.Cache<K,V>
nodeToMove
- newParent
-
org.jboss.cache.NodeNotExistsException
public String getVersion()
getVersion
in interface org.jboss.cache.Cache<K,V>
public Set<K> getKeys(String fqn)
getKeys
in interface org.jboss.cache.Cache<K,V>
fqn
-
public void clearData(String fqn)
clearData
in interface org.jboss.cache.Cache<K,V>
fqn
- public void clearData(org.jboss.cache.Fqn<?> fqn)
clearData
in interface org.jboss.cache.Cache<K,V>
fqn
- public Set getKeys(org.jboss.cache.Fqn<?> fqn)
getKeys
in interface org.jboss.cache.Cache<K,V>
fqn
-
public Map getData(org.jboss.cache.Fqn<?> fqn)
getData
in interface org.jboss.cache.Cache<K,V>
fqn
-
public void move(org.jboss.cache.Fqn<?> nodeToMove, org.jboss.cache.Fqn<?> newParent) throws org.jboss.cache.NodeNotExistsException
move
in interface org.jboss.cache.Cache<K,V>
nodeToMove
- newParent
-
org.jboss.cache.NodeNotExistsException
public boolean removeRegion(org.jboss.cache.Fqn<?> fqn)
removeRegion
in interface org.jboss.cache.Cache<K,V>
fqn
-
public org.jboss.cache.Region getRegion(org.jboss.cache.Fqn<?> fqn, boolean createIfAbsent)
getRegion
in interface org.jboss.cache.Cache<K,V>
fqn
- createIfAbsent
-
public void evict(org.jboss.cache.Fqn<?> fqn)
evict
in interface org.jboss.cache.Cache<K,V>
fqn
- public void evict(org.jboss.cache.Fqn<?> fqn, boolean recursive)
evict
in interface org.jboss.cache.Cache<K,V>
fqn
- recursive
- public V get(org.jboss.cache.Fqn<?> fqn, K key)
get
in interface org.jboss.cache.Cache<K,V>
fqn
- key
-
public org.jboss.cache.Node getNode(org.jboss.cache.Fqn<?> fqn)
getNode
in interface org.jboss.cache.Cache<K,V>
fqn
-
public boolean removeNode(org.jboss.cache.Fqn<?> fqn)
removeNode
in interface org.jboss.cache.Cache<K,V>
fqn
-
public V remove(org.jboss.cache.Fqn<?> fqn, K key)
remove
in interface org.jboss.cache.Cache<K,V>
fqn
- key
-
public void put(org.jboss.cache.Fqn<?> fqn, Map<K,V> data)
put
in interface org.jboss.cache.Cache<K,V>
fqn
- data
- public void putForExternalRead(org.jboss.cache.Fqn<?> fqn, K key, V value)
putForExternalRead
in interface org.jboss.cache.Cache<K,V>
fqn
- key
- value
- public V put(org.jboss.cache.Fqn<?> fqn, K key, V value)
put
in interface org.jboss.cache.Cache<K,V>
fqn
- key
- value
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |