| Modifier and Type | Field and Description |
|---|---|
| private final CacheConfiguration | |
| private final Store | |
| private final RegisteredEventListeners | |
| private final Store | |
| private final StripedReadWriteLockSync | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | LegacyStoreWrapper(Store
in-memory store memory, Store on disk store disk, RegisteredEventListeners event listener to fire on eventListeners, CacheConfiguration cache configuration config)Create a correctly locked store wrapper around the supplied in-memory and on disk stores. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | bufferFull()
Implements net. |
| public boolean | containsKey(Object
The Element key key)Implements net. |
| public boolean | containsKeyInMemory(Object
The Element key key)Implements net. |
| public boolean | containsKeyOffHeap(Object
The Element key key)Implements net. |
| public boolean | containsKeyOnDisk(Object
The Element key key)Implements net. |
| public void | |
| public void | |
| public void | |
| public Element | |
| 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 Store | |
| public int | getOffHeapSize()
Implements net. |
| public long | getOffHeapSizeInBytes()
Implements net. |
| public int | getOnDiskSize()
Implements net. |
| public long | getOnDiskSizeInBytes()
Implements net. |
| public Element | getQuiet(Object key)
Implements net. Element from the Store, without updating statistics
|
| public int | getSize()
Implements net.
The size is the number of |
| public Status | |
| public int | getTerracottaClusteredSize()
Implements net. |
| public boolean | |
| public Element | putIfAbsent(Element
element to be added element)Implements net. |
| public boolean | putWithWriter(Element element, CacheWriterManager writerManager)
Implements net. |
| public Element | |
| public void | removeAll()
Implements net. |
| public Element | removeElement(Element
Element to be removed element, ElementValueComparator ElementValueComparator to use to compare elements comparator)Implements net. |
| public Element | removeWithWriter(Object key, CacheWriterManager writerManager)
Implements net. |
| public boolean | replace(Element
Element to be test against old, Element Element to be cached element, ElementValueComparator ElementValueComparator to use to compare elements comparator)Implements net. |
| public Element | replace(Element
Element to be cached element)Implements net. |
| public void | setInMemoryEvictionPolicy(Policy
the new policy policy)Implements net. |
| config | back to summary |
|---|---|
| private final CacheConfiguration config | |
| disk | back to summary |
|---|---|
| private final Store disk
| |
| eventListeners | back to summary |
|---|---|
| private final RegisteredEventListeners eventListeners | |
| memory | back to summary |
|---|---|
| private final Store memory
| |
| sync | back to summary |
|---|---|
| private final StripedReadWriteLockSync sync | |
| SYNC_STRIPES | back to summary |
|---|---|
| private static final int SYNC_STRIPES | |
| LegacyStoreWrapper | back to summary |
|---|---|
| public LegacyStoreWrapper(Store memory, Store disk, RegisteredEventListeners eventListeners, CacheConfiguration config) Create a correctly locked store wrapper around the supplied in-memory and on disk stores.
| |
| 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(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(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(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(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. | |
| 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(Object key) Implements net. Doc from net. Gets an item from the cache. | |
| 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.
| |
| getMemoryStore | back to summary |
|---|---|
| public Store getMemoryStore() Returns the underlying memory store for this legacy wrapper. | |
| 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(Object key) Implements net. Doc from net. Gets an
| |
| getSize | back to summary |
|---|---|
| public int getSize() Implements net. Doc from net. Returns the current local store size
The size is the number of
| |
| 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
| |
| put | back to summary |
|---|---|
| public boolean put(Element element) throws CacheException Implements net. Doc from net. Puts an item into the store.
| |
| putIfAbsent | back to summary |
|---|---|
| public Element putIfAbsent(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(Element element, CacheWriterManager writerManager) throws CacheException Implements net. Doc from net. Puts an item into the store and the cache writer manager in an atomic operation
| |
| remove | back to summary |
|---|---|
| public Element remove(Object key) Implements net. Doc from net. Removes an item 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(Element element, 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.
| |
| removeWithWriter | back to summary |
|---|---|
| public Element removeWithWriter(Object key, 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(Element old, Element element, 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(Element element) throws NullPointerException Implements net. Doc from net. Replace the cached element only if an Element is currently cached for this key
| |
| setInMemoryEvictionPolicy | back to summary |
|---|---|
| public void setInMemoryEvictionPolicy(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.
| |