| Modifier and Type | Class and Description |
|---|---|
| private static class | KeySnapshotter.SnapShottingThread
Thread doing background snapshots of the local key set |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private static final WeakIdentityConcurrentMap | |
| private static final Logger | |
| private volatile Runnable | |
| private static final int | |
| private final RotatingSnapshotFile | |
| private final ScheduledFuture | |
| private volatile TerracottaStore | |
| private final Thread |
| Access | Constructor and Description |
|---|---|
| pack-priv | KeySnapshotter(final Ehcache
the Terracotta clustered Cache to snapshot cache, final long the interval to do the snapshots on interval, final boolean whether the snapshots have to be done on a dedicated thread doKeySnapshotOnDedicatedThread, final RotatingSnapshotFile the RotatingSnapshotFile to write to rotatingWriter)Default Constructor |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | dispose(boolean
whether to leave the writer finish or shut down immediately immediately)Shuts down the writer thread and cleans up resources |
| pack-priv void | doSnapshot()
Calling this method will result in a snapshot being taken or wait for the one in progress to finish |
| public String | Returns: The name of the cacheReturns the name of the underlying cache for which this snapshots |
| pack-priv static Collection | Returns: the collection of known CacheManagersAccessor to all known cacheManagers (which are also bound to a ScheduledExecutorService) |
| private ScheduledExecutorService | |
| private void | |
| public void | |
| pack-priv void | setOnSnapshot(final Runnable
the runnable onSnapshot)Let register a Runnable that will be called on every snapshot happening |
| cacheName | back to summary |
|---|---|
| private final String cacheName | |
| INSTANCES | back to summary |
|---|---|
| private static final WeakIdentityConcurrentMap<CacheManager, ScheduledExecutorService> INSTANCES | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| onSnapshot | back to summary |
|---|---|
| private volatile Runnable onSnapshot | |
| POOL_SIZE | back to summary |
|---|---|
| private static final int POOL_SIZE | |
| rotatingWriter | back to summary |
|---|---|
| private final RotatingSnapshotFile rotatingWriter | |
| scheduledFuture | back to summary |
|---|---|
| private final ScheduledFuture<?> scheduledFuture | |
| tcStore | back to summary |
|---|---|
| private volatile TerracottaStore tcStore | |
| thread | back to summary |
|---|---|
| private final Thread thread | |
| KeySnapshotter | back to summary |
|---|---|
| pack-priv KeySnapshotter(final Ehcache cache, final long interval, final boolean doKeySnapshotOnDedicatedThread, final RotatingSnapshotFile rotatingWriter) throws IllegalArgumentException Default Constructor
| |
| dispose | back to summary |
|---|---|
| pack-priv void dispose(boolean immediately) Shuts down the writer thread and cleans up resources
| |
| doSnapshot | back to summary |
|---|---|
| pack-priv void doSnapshot() throws IOException Calling this method will result in a snapshot being taken or wait for the one in progress to finish
| |
| getCacheName | back to summary |
|---|---|
| public String getCacheName() Returns the name of the underlying cache for which this snapshots
| |
| getKnownCacheManagers | back to summary |
|---|---|
| pack-priv static Collection Accessor to all known cacheManagers (which are also bound to a ScheduledExecutorService)
| |
| getScheduledExecutorService | back to summary |
|---|---|
| private ScheduledExecutorService getScheduledExecutorService(final CacheManager cacheManager) | |
| onSnapshot | back to summary |
|---|---|
| private void onSnapshot() | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |
| setOnSnapshot | back to summary |
|---|---|
| pack-priv void setOnSnapshot(final Runnable onSnapshot) Let register a Runnable that will be called on every snapshot happening
| |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | run()
Overrides java. Implements java. |
| interval | back to summary |
|---|---|
| private final long interval | |
| lastRun | back to summary |
|---|---|
| private long lastRun | |
| SnapShottingThread | back to summary |
|---|---|
| public SnapShottingThread(final Runnable runnable, final long interval, final String threadName) | |
| run | back to summary |
|---|---|
| public void run() Overrides java. Implements java. Doc from java. This method is run by the thread when it executes. Subclasses of This method is not intended to be invoked directly. If this thread is a
platform thread created with a
| |