|
||||||||||
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.CacheRefTable
public class CacheRefTable
Cache wrapper around RefTable.
Currently this is a straight pass-through.
Constructor Summary | |
---|---|
CacheRefTable(RefTable dbTable,
CacheDatabase cacheDatabase)
Initialize a new wrapper. |
Method Summary | |
---|---|
boolean |
compareAndPut(RefKey refKey,
GitStore.RefData oldData,
GitStore.RefData newData)
Compare a reference, and put if it matches. |
boolean |
compareAndRemove(RefKey refKey,
GitStore.RefData oldData)
Compare a reference, and delete if it matches. |
java.util.Map<RefKey,GitStore.RefData> |
getAll(Context options,
RepositoryKey repository)
Read all known references in the repository. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheRefTable(RefTable dbTable, CacheDatabase cacheDatabase)
dbTable
- the underlying database's corresponding table.cacheDatabase
- the cache database.Method Detail |
---|
public java.util.Map<RefKey,GitStore.RefData> getAll(Context options, RepositoryKey repository) throws DhtException, java.util.concurrent.TimeoutException
RefTable
getAll
in interface RefTable
options
- options to control reading.repository
- the repository to load the references from.
DhtException
- the database cannot be read.
java.util.concurrent.TimeoutException
- the operation to read the database timed out.public boolean compareAndRemove(RefKey refKey, GitStore.RefData oldData) throws DhtException, java.util.concurrent.TimeoutException
RefTable
compareAndRemove
in interface RefTable
refKey
- reference to delete.oldData
- the old data for the reference. The delete only occurs if the
value is still equal to oldData
.
oldData
.
DhtException
- the database cannot be updated.
java.util.concurrent.TimeoutException
- the operation to modify the database timed out.public boolean compareAndPut(RefKey refKey, GitStore.RefData oldData, GitStore.RefData newData) throws DhtException, java.util.concurrent.TimeoutException
RefTable
compareAndPut
in interface RefTable
refKey
- reference to create or replace.oldData
- the old data for the reference. The put only occurs if the
value is still equal to oldData
. Use
RefDataUtil.NONE
if the reference should not exist and
is being created.newData
- new value to store.
prior
.
DhtException
- the database cannot be updated.
java.util.concurrent.TimeoutException
- the operation to modify the database timed out.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |