|
||||||||||
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.CacheRepositoryIndexTable
public class CacheRepositoryIndexTable
Cache wrapper around RepositoryIndexTable.
Constructor Summary | |
---|---|
CacheRepositoryIndexTable(RepositoryIndexTable dbTable,
CacheDatabase cacheDatabase)
Initialize a new wrapper. |
Method Summary | |
---|---|
RepositoryKey |
get(RepositoryName name)
Find a repository by name. |
void |
putUnique(RepositoryName name,
RepositoryKey key)
Atomically record the association of name to identifier. |
void |
remove(RepositoryName name,
RepositoryKey key)
Remove the association of a name to an identifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheRepositoryIndexTable(RepositoryIndexTable dbTable, CacheDatabase cacheDatabase)
dbTable
- the underlying database's corresponding table.cacheDatabase
- the cache database.Method Detail |
---|
public RepositoryKey get(RepositoryName name) throws DhtException, java.util.concurrent.TimeoutException
RepositoryIndexTable
get
in interface RepositoryIndexTable
name
- name of the repository, from the URL.
DhtException
java.util.concurrent.TimeoutException
public void putUnique(RepositoryName name, RepositoryKey key) throws DhtException, java.util.concurrent.TimeoutException
RepositoryIndexTable
This method must use some sort of transaction system to ensure the name
either points at key
when complete, or fails fast with an
exception if the name is used by a different key. This may require
running some sort of lock management service in parallel to the database.
putUnique
in interface RepositoryIndexTable
name
- name of the repository.key
- internal key used to find the repository's data.
DhtException
java.util.concurrent.TimeoutException
public void remove(RepositoryName name, RepositoryKey key) throws DhtException, java.util.concurrent.TimeoutException
RepositoryIndexTable
This method must use some sort of transaction system to ensure the name
is removed only if it currently references key
. This may require
running some sort of lock management service in parallel to the database.
remove
in interface RepositoryIndexTable
name
- name of the repository.key
- internal key defining the repository.
DhtException
java.util.concurrent.TimeoutException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |