| Modifier and Type | Field and Description |
|---|---|
| private final CopyStrategyHandler | |
| private final T |
| Access | Constructor and Description |
|---|---|
| public | AbstractCopyingCacheStore(final T
the real store store, final boolean whether to copy on reads copyOnRead, final boolean whether to copy on writes copyOnWrite, final ReadWriteCopyStrategy<Element> the copy strategy to use on every copy operation copyStrategyInstance, ClassLoader classloader of the containing cache loader)Creates a copying instance of store, that wraps the actual storage |
| Modifier and Type | Method and Description |
|---|---|
| public void | addStoreListener(final StoreListener listener)
Implements net. |
| public boolean | bufferFull()
Implements net. |
| public boolean | containsKey(final Object
The Element key key)Implements net. |
| public boolean | containsKeyInMemory(final Object
The Element key key)Implements net. |
| public boolean | containsKeyOffHeap(final Object
The Element key key)Implements net. |
| public boolean | containsKeyOnDisk(final Object
The Element key key)Implements net. |
| public void | |
| public Results | executeQuery(final StoreQuery
query to execute query)Implements net. |
| public void | |
| public void | |
| public Element | |
| public Map | getAll(final Collection<?>
a collection of keys to look for keys)Implements net. |
| public Map | getAllQuiet(final Collection<?>
a collection of keys to look for keys)Implements net. |
| protected CopyStrategyHandler | |
| public Policy | |
| public int | getInMemorySize()
Implements net. |
| public long | getInMemorySizeInBytes()
Implements net. |
| public Object | getInternalContext()
Implements net. |
| public List | getKeys()
Implements net. |
| public Object | getMBean()
Implements net. |
| public int | getOffHeapSize()
Implements net. |
| public long | getOffHeapSizeInBytes()
Implements net. |
| public int | getOnDiskSize()
Implements net. |
| public long | getOnDiskSizeInBytes()
Implements net. |
| public Element | getQuiet(final Object key)
Implements net. Element from the Store, without updating statistics
|
| public <S> Attribute | getSearchAttribute(final String
the name of the attribute to retrieve attributeName)Implements net. |
| public Set | |
| public int | |
| public Status | |
| public int | getTerracottaClusteredSize()
Implements net. |
| public T | |
| public boolean | hasAbortedSizeOf()
Implements net. |
| public boolean | isCacheCoherent()
Implements net. |
| public boolean | isClusterCoherent()
Implements net. |
| public boolean | isNodeCoherent()
Implements net. |
| public boolean | |
| public void | putAll(final Collection<Element>
Collection of elements to be put in the store elements)Implements net. |
| public Element | putIfAbsent(final Element
element to be added element)Implements net. |
| public boolean | putWithWriter(final Element element, final CacheWriterManager writerManager)
Implements net. |
| public void | recalculateSize(final Object
the key key)Implements net. |
| public Element | remove(final Object key)
Implements net. |
| public void | removeAll(final Collection<?> keys)
Implements net. |
| public void | removeAll()
Implements net. |
| public Element | removeElement(final Element
Element to be removed element, final ElementValueComparator ElementValueComparator to use to compare elements comparator)Implements net. |
| public void | removeStoreListener(final StoreListener listener)
Implements net. |
| public Element | removeWithWriter(final Object key, final CacheWriterManager writerManager)
Implements net. |
| public boolean | replace(final Element
Element to be test against old, final Element Element to be cached element, final ElementValueComparator ElementValueComparator to use to compare elements comparator)Implements net. |
| public Element | replace(final Element
Element to be cached element)Implements net. |
| public void | setAttributeExtractors(final Map<String, AttributeExtractor> extractors)
Implements net. |
| public void | setInMemoryEvictionPolicy(final Policy
the new policy policy)Implements net. |
| public void | setNodeCoherent(final boolean
true transitions to coherent mode, false to incoherent mode coherent)Implements net. |
| public void | waitUntilClusterCoherent()
Implements net. |
| copyStrategyHandler | back to summary |
|---|---|
| private final CopyStrategyHandler copyStrategyHandler | |
| store | back to summary |
|---|---|
| private final T store
| |
| AbstractCopyingCacheStore | back to summary |
|---|---|
| public AbstractCopyingCacheStore(final T store, final boolean copyOnRead, final boolean copyOnWrite, final ReadWriteCopyStrategy<Element> copyStrategyInstance, ClassLoader loader) Creates a copying instance of store, that wraps the actual storage
| |
| addStoreListener | back to summary |
|---|---|
| public void addStoreListener(final StoreListener listener) Implements net. Doc from net. Add a listener to the store.
| |
| bufferFull | back to summary |
|---|---|
| public boolean bufferFull() Implements net. Doc from net. Some store types, such as the disk stores can fill their write buffers if puts come in too fast. The thread will wait for a short time before checking again.
| |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(final Object key) Implements net. Doc from net. A check to see if a key is in the Store. | |
| containsKeyInMemory | back to summary |
|---|---|
| public boolean containsKeyInMemory(final Object key) Implements net. Doc from net. A check to see if a key is in the Store and is currently held in memory. | |
| containsKeyOffHeap | back to summary |
|---|---|
| public boolean containsKeyOffHeap(final Object key) Implements net. Doc from net. A check to see if a key is in the Store and is currently held off-heap. | |
| containsKeyOnDisk | back to summary |
|---|---|
| public boolean containsKeyOnDisk(final Object key) Implements net. Doc from net. A check to see if a key is in the Store and is currently held on disk. | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements net. Doc from net. Prepares for shutdown.
| |
| executeQuery | back to summary |
|---|---|
| public Results executeQuery(final StoreQuery query) throws SearchException Implements net. Doc from net. Execute the given query on this store
| |
| expireElements | back to summary |
|---|---|
| public void expireElements() Implements net. Doc from net. Expire all elements.
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements net. Doc from net. Flush elements to persistent store.
| |
| get | back to summary |
|---|---|
| public Element get(final Object key) Implements net. Doc from net. Gets an item from the cache.
| |
| getAll | back to summary |
|---|---|
| public Map Implements net. Doc from net. Retries the elements associated with a set of keys and update the statistics Keys which are not present in the cache will have null values associated with them in the returned map
| |
| getAllQuiet | back to summary |
|---|---|
| public Map Implements net. Doc from net. Retries the elements associated with a set of keys without updating the statistics Keys which are not present in the cache will have null values associated with them in the returned map
| |
| getCopyStrategyHandler | back to summary |
|---|---|
| protected CopyStrategyHandler getCopyStrategyHandler() Accessor to the
| |
| getInMemoryEvictionPolicy | back to summary |
|---|---|
| public Policy getInMemoryEvictionPolicy() Implements net.
| |
| getInMemorySize | back to summary |
|---|---|
| public int getInMemorySize() Implements net. Doc from net. Returns the current local in-memory store size
| |
| getInMemorySizeInBytes | back to summary |
|---|---|
| public long getInMemorySizeInBytes() Implements net. Doc from net. Gets the size of the in-memory portion of the store, in bytes. This method may be expensive to run, depending on implementation. Implementers may choose to return an approximate size.
| |
| getInternalContext | back to summary |
|---|---|
| public Object getInternalContext() Implements net. Doc from net. This should not be used, and will generally return null | |
| getKeys | back to summary |
|---|---|
| public List Implements net. Doc from net. Gets an Array of the keys for all elements in the disk store.
| |
| getMBean | back to summary |
|---|---|
| public Object getMBean() Implements net. Doc from net. Optional implementation specific MBean exposed by the store. | |
| getOffHeapSize | back to summary |
|---|---|
| public int getOffHeapSize() Implements net. Doc from net. Returns the current local off-heap store size
| |
| getOffHeapSizeInBytes | back to summary |
|---|---|
| public long getOffHeapSizeInBytes() Implements net. Doc from net. Gets the size of the off-heap portion of the store, in bytes.
| |
| getOnDiskSize | back to summary |
|---|---|
| public int getOnDiskSize() Implements net. Doc from net. Returns the current local on-disk store size
| |
| getOnDiskSizeInBytes | back to summary |
|---|---|
| public long getOnDiskSizeInBytes() Implements net. Doc from net. Gets the size of the on-disk portion of the store, in bytes.
| |
| getQuiet | back to summary |
|---|---|
| public Element getQuiet(final Object key) Implements net. Doc from net. Gets an | |
| getSearchAttribute | back to summary |
|---|---|
| public <S> Attribute Implements net. Doc from net. Retrieve the given named search attribute | |
| getSearchAttributes | back to summary |
|---|---|
| public Set Implements net.
| |
| getSize | back to summary |
|---|---|
| public int getSize() Implements net. Doc from net. Returns the current local store size
| |
| getStatus | back to summary |
|---|---|
| public Status getStatus() Implements net. Doc from net. Returns the cache status.
| |
| getTerracottaClusteredSize | back to summary |
|---|---|
| public int getTerracottaClusteredSize() Implements net. Doc from net. Returns the current Terracotta clustered store size
| |
| getUnderlyingStore | back to summary |
|---|---|
| public T getUnderlyingStore() Accessor to the underlying store
| |
| hasAbortedSizeOf | back to summary |
|---|---|
| public boolean hasAbortedSizeOf() Implements net. Doc from net. Checks if the cache may contain elements for which the SizeOf engine gave up and only partially calculated the size.
| |
| isCacheCoherent | back to summary |
|---|---|
| public boolean isCacheCoherent() Implements net. Doc from net. Indicates whether this store provides a coherent view of all the elements
in a cache.
Note that this is same as calling
| |
| isClusterCoherent | back to summary |
|---|---|
| public boolean isClusterCoherent() throws TerracottaNotRunningException Implements net. Doc from net. Returns true if the cache is in coherent mode cluster-wide. Returns false otherwise. It applies to coherent clustering mechanisms only e.g. Terracotta
| |
| isNodeCoherent | back to summary |
|---|---|
| public boolean isNodeCoherent() throws TerracottaNotRunningException Implements net. Doc from net. Returns true if the cache is in coherent mode for the current node. Returns false otherwise. It applies to coherent clustering mechanisms only e.g. Terracotta
| |
| put | back to summary |
|---|---|
| public boolean put(final Element e) throws CacheException Implements net. Doc from net. Puts an item into the store.
| |
| putAll | back to summary |
|---|---|
| public void putAll(final Collection<Element> elements) throws CacheException Implements net. Doc from net. Puts a collection of elements into the store.
| |
| putIfAbsent | back to summary |
|---|---|
| public Element putIfAbsent(final Element element) throws NullPointerException Implements net. Doc from net. Put an element in the store if no element is currently mapped to the elements key.
| |
| putWithWriter | back to summary |
|---|---|
| public boolean putWithWriter(final Element element, final CacheWriterManager writerManager) throws CacheException Implements net. Doc from net. Puts an item into the store and the cache writer manager in an atomic operation
| |
| recalculateSize | back to summary |
|---|---|
| public void recalculateSize(final Object key) Implements net. Doc from net. Recalculate size of the element mapped to the key | |
| remove | back to summary |
|---|---|
| public Element remove(final Object key) Implements net. Doc from net. Removes an item from the cache.
| |
| removeAll | back to summary |
|---|---|
| public void removeAll(final Collection<?> keys) Implements net. Doc from net. Removes a collection of elements from the cache.
| |
| removeAll | back to summary |
|---|---|
| public void removeAll() throws CacheException Implements net. Doc from net. Remove all of the elements from the store.
If there are registered
| |
| removeElement | back to summary |
|---|---|
| public Element removeElement(final Element element, final ElementValueComparator comparator) throws NullPointerException Implements net. Doc from net. Remove the Element mapped to the key for the supplied element if the value of the supplied Element is equal to the value of the cached Element. This is a CAS operation. It is consistent even against a distributed cache that is not coherent. If the old value is stale when this operation is attempted the remove does not take place.
| |
| removeStoreListener | back to summary |
|---|---|
| public void removeStoreListener(final StoreListener listener) Implements net. Doc from net. Remove listener from store.
| |
| removeWithWriter | back to summary |
|---|---|
| public Element removeWithWriter(final Object key, final CacheWriterManager writerManager) throws CacheException Implements net. Doc from net. Removes an item from the store and the cache writer manager in an atomic operation.
| |
| replace | back to summary |
|---|---|
| public boolean replace(final Element old, final Element element, final ElementValueComparator comparator) throws NullPointerException, IllegalArgumentException Implements net. Doc from net. Replace the cached element only if the value of the current Element is equal to the value of the supplied old Element.
| |
| replace | back to summary |
|---|---|
| public Element replace(final Element element) throws NullPointerException Implements net. Doc from net. Replace the cached element only if an Element is currently cached for this key
| |
| setAttributeExtractors | back to summary |
|---|---|
| public void setAttributeExtractors(final Map<String, AttributeExtractor> extractors) Implements net. Doc from net. Inform this store of the configured attribute extractors. Stores that will not invoke extractors are free to ignore this call
| |
| setInMemoryEvictionPolicy | back to summary |
|---|---|
| public void setInMemoryEvictionPolicy(final Policy policy) Implements net. Doc from net. Sets the eviction policy strategy. The Store will use a policy at startup. The store may allow changing the eviction policy strategy dynamically. Otherwise implementations will throw an exception if this method is called. | |
| setNodeCoherent | back to summary |
|---|---|
| public void setNodeCoherent(final boolean coherent) throws UnsupportedOperationException, TerracottaNotRunningException Implements net. Doc from net. Sets the cache in coherent or incoherent mode for the current node depending on the parameter.
Calling It applies to coherent clustering mechanisms only e.g. Terracotta
| |
| waitUntilClusterCoherent | back to summary |
|---|---|
| public void waitUntilClusterCoherent() throws UnsupportedOperationException, TerracottaNotRunningException, InterruptedException Implements net. Doc from net. This method waits until the cache is in coherent mode in all the connected nodes. If the cache is already in coherent mode it returns immediately It applies to coherent clustering mechanisms only e.g. Terracotta
| |