public class DatabaseCacheWithLifetimes extends DatabaseCache
Database
implementation with a cache that supports expiration times.Constructor and Description |
---|
DatabaseCacheWithLifetimes(Database database,
CacheWithLifetimes<java.lang.String,java.lang.Object> cacheInstance,
long lifetime,
java.util.concurrent.TimeUnit lifetimeUnit)
Constructor which is designed to work with a variety of different caches.
|
Modifier and Type | Method and Description |
---|---|
CacheWithLifetimes<java.lang.String,java.lang.Object> |
getCache()
Returns the cache so that the application can manage it using the Cache
API methods.
|
bulk, contains, find, find, findAny, post, post, remove, save, save, update, update
changes, createIndex, createIndex, deleteIndex, ensureFullCommit, find, find, find, findByIndex, findByIndex, getAllDocsRequestBuilder, getAttachment, getAttachment, getDBUri, getDesignDocumentManager, getPermissions, getShard, getShards, getViewRequestBuilder, info, invokeUpdateHandler, listIndices, remove, removeAttachment, removeAttachment, saveAttachment, saveAttachment, search, setPermissions
public DatabaseCacheWithLifetimes(Database database, CacheWithLifetimes<java.lang.String,java.lang.Object> cacheInstance, long lifetime, java.util.concurrent.TimeUnit lifetimeUnit)
database
- data structure with information about the database connectioncacheInstance
- cache instance which has already been created and initializedlifetime
- lifetime for objects in this cachelifetimeUnit
- TimeUnit to use for the lifetimepublic CacheWithLifetimes<java.lang.String,java.lang.Object> getCache()
DatabaseCache
getCache
in class DatabaseCache