public class ContentCacheControllerImpl extends AbstractSchedulingContentCacheController
Modifier and Type | Class and Description |
---|---|
private class |
ContentCacheControllerImpl.CompleteUpdate |
private class |
ContentCacheControllerImpl.PartialUpdate |
private static class |
ContentCacheControllerImpl.State |
private class |
ContentCacheControllerImpl.Update |
Modifier and Type | Field and Description |
---|---|
private WritableContentCache |
cache |
private static AtomicInteger |
COMPLETE_UPDATE_COUNT |
private ContentCacheControllerImpl.CompleteUpdate |
current |
private ReentrantLock |
lock |
private static org.slf4j.Logger |
LOGGER |
private ContentCacheControllerImpl.CompleteUpdate |
next |
private static AtomicInteger |
PARTIAL_UPDATE_COUNT |
private ContentCachePersistenceStrategy |
persistenceStrategy |
Constructor and Description |
---|
ContentCacheControllerImpl() |
ContentCacheControllerImpl(ContentCachePersistenceStrategy persistenceStrategy) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
private void |
executeComplete(ContentCacheControllerImpl.CompleteUpdate update) |
private void |
executePartial(ContentCacheControllerImpl.PartialUpdate update) |
WritableContentCache |
getCache() |
ContentCachePersistenceStrategy |
getContentCachePersistenceStrategy() |
boolean |
isUpdateInProgress() |
private void |
loadOrCreateCache() |
private void |
lock() |
private void |
runCurrent() |
protected void |
setCache(WritableContentCache wcc) |
private void |
unlock() |
void |
update()
Renew the content cache completly.
|
void |
update(ContentCacheUpdate update)
Update the content cache with the specified update.
|
finalize, isInitialized, setInitialized, setUpdateInterval
private static final org.slf4j.Logger LOGGER
private static final AtomicInteger COMPLETE_UPDATE_COUNT
private static final AtomicInteger PARTIAL_UPDATE_COUNT
private ContentCacheControllerImpl.CompleteUpdate current
private ContentCacheControllerImpl.CompleteUpdate next
private volatile WritableContentCache cache
private final ReentrantLock lock
private final ContentCachePersistenceStrategy persistenceStrategy
public ContentCacheControllerImpl(ContentCachePersistenceStrategy persistenceStrategy)
public ContentCacheControllerImpl()
private void loadOrCreateCache()
public WritableContentCache getCache()
public void cleanup()
cleanup
in interface Cleanupable
cleanup
in class AbstractSchedulingContentCacheController
protected void setCache(WritableContentCache wcc)
public void update(ContentCacheUpdate update) throws OwsExceptionReport
ContentCacheController
update
- the updateOwsExceptionReport
- if an error occurs while updating the cacheprivate void runCurrent() throws OwsExceptionReport
OwsExceptionReport
private void executePartial(ContentCacheControllerImpl.PartialUpdate update) throws OwsExceptionReport
OwsExceptionReport
private void executeComplete(ContentCacheControllerImpl.CompleteUpdate update) throws OwsExceptionReport
OwsExceptionReport
private void lock()
private void unlock()
public boolean isUpdateInProgress()
public void update() throws OwsExceptionReport
ContentCacheController
OwsExceptionReport
- if an error occurs while updating the cachepublic ContentCachePersistenceStrategy getContentCachePersistenceStrategy()
Copyright © 2012-2015 52north.org. All Rights Reserved.