public class CacheGetterTask extends Object implements Future<CacheGetResult>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CacheGetterTask.InvalidatedKey |
| Modifier and Type | Field and Description |
|---|---|
protected ArcacheBackendClient |
backendClient |
protected boolean |
cancelled |
protected ArcacheConfigurationGetInterface |
config |
protected boolean |
done |
protected ArcacheBackendClient |
invalidationBackendClient |
protected HashMap<String,Future<Object>> |
invalidationKeysFutureGets |
protected String |
key |
protected ar.com.siripo.arcache.BackendKeyBuilder |
keyBuilder |
protected Future<Object> |
mainFutureGet |
protected Random |
random |
protected boolean |
relaxOperationTimeoutInHeavyLoadSystem |
protected CacheGetResult |
valueToReturn |
| Modifier | Constructor and Description |
|---|---|
protected |
CacheGetterTask(String key,
ArcacheBackendClient backendClient,
ArcacheBackendClient invalidationBackendClient,
ar.com.siripo.arcache.BackendKeyBuilder keyBuilder,
ArcacheConfigurationGetInterface config,
Random random) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
protected CacheGetResult |
doTask(long startTimeMillis,
long timeoutMillis) |
CacheGetResult |
get() |
CacheGetResult |
get(long timeout,
TimeUnit unit) |
protected CacheInvalidationObject |
getsCacheInvalidationObjectFromFuture(Future<Object> future,
long timeoutMillis) |
protected boolean |
isCachedObjectExpired(ExpirableCacheObject cachedObject,
long currentTimeMillis) |
protected CacheGetterTask.InvalidatedKey |
isCachedObjectInvalidated(ExpirableCacheObject cachedObject,
HashMap<String,CacheInvalidationObject> invalidationMap,
long currentTimeMillis) |
boolean |
isCancelled() |
boolean |
isDone() |
protected HashMap<String,CacheInvalidationObject> |
loadInvalidationKeys(ExpirableCacheObject cachedObject,
long startTimeMillis,
long timeoutMillis) |
protected final String key
protected final ArcacheBackendClient backendClient
protected final ArcacheBackendClient invalidationBackendClient
protected final ar.com.siripo.arcache.BackendKeyBuilder keyBuilder
protected final ArcacheConfigurationGetInterface config
protected final Random random
protected boolean cancelled
protected boolean done
protected CacheGetResult valueToReturn
protected boolean relaxOperationTimeoutInHeavyLoadSystem
protected CacheGetterTask(String key, ArcacheBackendClient backendClient, ArcacheBackendClient invalidationBackendClient, ar.com.siripo.arcache.BackendKeyBuilder keyBuilder, ArcacheConfigurationGetInterface config, Random random)
public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface Future<CacheGetResult>public boolean isCancelled()
isCancelled in interface Future<CacheGetResult>public boolean isDone()
isDone in interface Future<CacheGetResult>public CacheGetResult get() throws InterruptedException, ExecutionException
get in interface Future<CacheGetResult>InterruptedExceptionExecutionExceptionpublic CacheGetResult get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<CacheGetResult>InterruptedExceptionExecutionExceptionTimeoutExceptionprotected CacheGetResult doTask(long startTimeMillis, long timeoutMillis) throws InterruptedException, ExecutionException, TimeoutException
protected boolean isCachedObjectExpired(ExpirableCacheObject cachedObject, long currentTimeMillis)
protected HashMap<String,CacheInvalidationObject> loadInvalidationKeys(ExpirableCacheObject cachedObject, long startTimeMillis, long timeoutMillis) throws TimeoutException, InterruptedException, ExecutionException
protected CacheInvalidationObject getsCacheInvalidationObjectFromFuture(Future<Object> future, long timeoutMillis) throws InterruptedException, ExecutionException, TimeoutException
protected CacheGetterTask.InvalidatedKey isCachedObjectInvalidated(ExpirableCacheObject cachedObject, HashMap<String,CacheInvalidationObject> invalidationMap, long currentTimeMillis)
Copyright © 2019. All rights reserved.