public interface ClusteredCacheManager extends RootEntity<ClusteredCacheManagerConfiguration>
| Modifier and Type | Method and Description |
|---|---|
ClusteredCache |
addCacheIfAbsent(String cacheName,
ClusteredCache clusteredCache)
Method for adding a
ClusteredCache to this ClusteredCacheManager. |
boolean |
destroyCache(ClusteredCache clusteredCache)
Method for destroying a cache entity
This method will follow these steps: Put cache entity in exclusive maintenance mode If this fails, throws IllegalStateException
Verify the cache entity passed in matches the current known cache entity
If this fails, throws IllegalArgumentException
Update the cache entity state to ClusteredEntityState.DESTROY_IN_PROGRESS and save it
If this fails, throws UnsupportedOperationException
Perform the destroy operation
|
ClusteredCache |
getCache(String cacheName) |
org.terracotta.toolkit.concurrent.locks.ToolkitReadWriteLock |
getCacheLock(String cacheName) |
Map<String,ClusteredCache> |
getCaches() |
boolean |
isCacheUsed(ClusteredCache clusteredCache) |
boolean |
isUsed() |
void |
markCacheInUse(ClusteredCache clusteredCache) |
void |
markInUse() |
void |
releaseCacheUse(ClusteredCache clusteredCache) |
void |
releaseUse() |
getConfiguration, getStateMap<String,ClusteredCache> getCaches()
ClusteredCache getCache(String cacheName)
ClusteredCache addCacheIfAbsent(String cacheName, ClusteredCache clusteredCache)
ClusteredCache to this ClusteredCacheManager.
ClusteredCache with that name is already known, it will be returned and
the clusteredCache passed in will not be added.cacheName - the name of the cacheclusteredCache - the clustered cachenull otherwiseboolean destroyCache(ClusteredCache clusteredCache)
IllegalStateExceptionIllegalArgumentExceptionClusteredEntityState.DESTROY_IN_PROGRESS and save it
If this fails, throws UnsupportedOperationExceptionclusteredCache - the cache entity to destroytrue if entity was effectively destroyed, false if entity does not existorg.terracotta.toolkit.concurrent.locks.ToolkitReadWriteLock getCacheLock(String cacheName)
void markInUse()
void releaseUse()
boolean isUsed()
void markCacheInUse(ClusteredCache clusteredCache)
void releaseCacheUse(ClusteredCache clusteredCache)
boolean isCacheUsed(ClusteredCache clusteredCache)
Copyright © 2019 Terracotta, Inc.. All rights reserved.