|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jgit.storage.dht.spi.cache.CacheDatabase
public class CacheDatabase
Uses a cache for fast-lookups, but falls-back to another Database.
On a read miss, this database falls back to read another Database, and then puts the read value into the cache for later access.
Constructor Summary | |
---|---|
CacheDatabase(Database database,
java.util.concurrent.ExecutorService executor,
CacheService client,
CacheOptions options)
Initialize a cache database. |
Method Summary | |
---|---|
ChunkTable |
chunk()
|
CacheService |
getClient()
|
Database |
getDatabase()
|
java.util.concurrent.ExecutorService |
getExecutorService()
|
CacheOptions |
getOptions()
|
CacheBuffer |
newWriteBuffer()
Create a new WriteBuffer for the current thread. |
ObjectIndexTable |
objectIndex()
|
RefTable |
ref()
|
RepositoryTable |
repository()
|
RepositoryIndexTable |
repositoryIndex()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheDatabase(Database database, java.util.concurrent.ExecutorService executor, CacheService client, CacheOptions options)
database
- underlying storage database, used for read-misses and all
writes.executor
- executor service to perform expensive cache updates in the
background.client
- implementation of the cache service.options
- configuration of the cache.Method Detail |
---|
public Database getDatabase()
public java.util.concurrent.ExecutorService getExecutorService()
public CacheService getClient()
public CacheOptions getOptions()
public RepositoryIndexTable repositoryIndex()
repositoryIndex
in interface Database
public RepositoryTable repository()
repository
in interface Database
public RefTable ref()
ref
in interface Database
public ObjectIndexTable objectIndex()
objectIndex
in interface Database
public ChunkTable chunk()
chunk
in interface Database
public CacheBuffer newWriteBuffer()
Database
Unlike other methods on this interface, the returned buffer must be a new object on every invocation. Buffers do not need to be thread-safe.
newWriteBuffer
in interface Database
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |