|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.cache.search.SearchableCacheImpl<K,V>
public class SearchableCacheImpl<K,V>
Implementation class for the SearchableCache interface.
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 |
addInterceptor(org.jboss.cache.interceptors.base.CommandInterceptor i,
Class<? extends org.jboss.cache.interceptors.base.CommandInterceptor> afterInterceptor)
|
void |
addInterceptor(org.jboss.cache.interceptors.base.CommandInterceptor i,
int position)
|
void |
clearData(org.jboss.cache.Fqn fqn)
|
void |
clearData(String fqn)
|
void |
create()
Lifecycle method that initializes configuration state, the root node, etc. |
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 |
endBatch(boolean successful)
|
void |
evict(org.jboss.cache.Fqn fqn)
|
void |
evict(org.jboss.cache.Fqn fqn,
boolean recursive)
|
V |
get(org.jboss.cache.Fqn fqn,
K key)
|
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<K,V> |
getData(org.jboss.cache.Fqn fqn)
|
org.jboss.cache.InvocationContext |
getInvocationContext()
The current invocation context for the current invocation and cache instance. |
Set<K> |
getKeys(org.jboss.cache.Fqn 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<K,V> |
getNode(org.jboss.cache.Fqn fqn)
|
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)
|
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)
|
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)
|
void |
put(org.jboss.cache.Fqn fqn,
Map<? extends K,? extends V> data)
|
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<? extends K,? extends V> data)
|
void |
putForExternalRead(org.jboss.cache.Fqn fqn,
K key,
V value)
|
V |
remove(org.jboss.cache.Fqn fqn,
K key)
|
V |
remove(String fqn,
K key)
|
void |
removeCacheListener(Object listener)
Removes a listener from the cache. |
void |
removeInterceptor(Class<? extends org.jboss.cache.interceptors.base.CommandInterceptor> interceptorType)
|
void |
removeInterceptor(int position)
|
boolean |
removeNode(org.jboss.cache.Fqn fqn)
|
boolean |
removeNode(String fqn)
Convenience method that takes a string representation of an Fqn. |
boolean |
removeRegion(org.jboss.cache.Fqn fqn)
|
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 |
startBatch()
|
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, 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(org.jboss.cache.Fqn fqn, K key, V value)
put
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 putForExternalRead(org.jboss.cache.Fqn fqn, K key, V value)
putForExternalRead
in interface org.jboss.cache.Cache<K,V>
public void put(org.jboss.cache.Fqn fqn, Map<? extends K,? extends V> data)
put
in interface org.jboss.cache.Cache<K,V>
public void put(String fqn, Map<? extends K,? extends V> data)
put
in interface org.jboss.cache.Cache<K,V>
public V remove(org.jboss.cache.Fqn fqn, K key)
remove
in interface org.jboss.cache.Cache<K,V>
public V remove(String fqn, K key)
remove
in interface org.jboss.cache.Cache<K,V>
public boolean removeNode(org.jboss.cache.Fqn fqn)
removeNode
in interface org.jboss.cache.Cache<K,V>
public boolean removeNode(String fqn)
removeNode
in interface org.jboss.cache.Cache<K,V>
fqn
-
public org.jboss.cache.Node<K,V> getNode(org.jboss.cache.Fqn fqn)
getNode
in interface org.jboss.cache.Cache<K,V>
public org.jboss.cache.Node getNode(String fqn)
getNode
in interface org.jboss.cache.Cache<K,V>
fqn
-
public V get(org.jboss.cache.Fqn fqn, K key)
get
in interface org.jboss.cache.Cache<K,V>
public V get(String fqn, K key)
get
in interface org.jboss.cache.Cache<K,V>
fqn
- key
-
public void evict(org.jboss.cache.Fqn fqn, boolean recursive)
evict
in interface org.jboss.cache.Cache<K,V>
public void evict(org.jboss.cache.Fqn fqn)
evict
in interface org.jboss.cache.Cache<K,V>
public org.jboss.cache.Region getRegion(org.jboss.cache.Fqn fqn, boolean createIfAbsent)
getRegion
in interface org.jboss.cache.Cache<K,V>
public boolean removeRegion(org.jboss.cache.Fqn fqn)
removeRegion
in interface org.jboss.cache.Cache<K,V>
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(org.jboss.cache.Fqn nodeToMove, org.jboss.cache.Fqn newParent) throws org.jboss.cache.NodeNotExistsException
move
in interface org.jboss.cache.Cache<K,V>
org.jboss.cache.NodeNotExistsException
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 Map<K,V> getData(org.jboss.cache.Fqn fqn)
getData
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 Set<K> getKeys(org.jboss.cache.Fqn fqn)
getKeys
in interface org.jboss.cache.Cache<K,V>
public void clearData(String fqn)
clearData
in interface org.jboss.cache.Cache<K,V>
public void clearData(org.jboss.cache.Fqn fqn)
clearData
in interface org.jboss.cache.Cache<K,V>
public void startBatch()
startBatch
in interface org.jboss.cache.Cache<K,V>
public void endBatch(boolean successful)
endBatch
in interface org.jboss.cache.Cache<K,V>
public void removeInterceptor(Class<? extends org.jboss.cache.interceptors.base.CommandInterceptor> interceptorType)
removeInterceptor
in interface org.jboss.cache.Cache<K,V>
public void removeInterceptor(int position)
removeInterceptor
in interface org.jboss.cache.Cache<K,V>
public void addInterceptor(org.jboss.cache.interceptors.base.CommandInterceptor i, Class<? extends org.jboss.cache.interceptors.base.CommandInterceptor> afterInterceptor)
addInterceptor
in interface org.jboss.cache.Cache<K,V>
public void addInterceptor(org.jboss.cache.interceptors.base.CommandInterceptor i, int position)
addInterceptor
in interface org.jboss.cache.Cache<K,V>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |