|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RepositoryIndexTable
Maps a repository name from a URL, to the internal RepositoryKey
.
The internal identifier is used for all data storage, as its part of the row keys for each data row that makes up the repository. By using an internal key, repositories can be efficiently renamed in O(1) time, without changing existing data rows.
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. |
Method Detail |
---|
RepositoryKey get(RepositoryName name) throws DhtException, java.util.concurrent.TimeoutException
name
- name of the repository, from the URL.
DhtException
java.util.concurrent.TimeoutException
void putUnique(RepositoryName name, RepositoryKey key) throws DhtException, java.util.concurrent.TimeoutException
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.
name
- name of the repository.key
- internal key used to find the repository's data.
DhtException
java.util.concurrent.TimeoutException
void remove(RepositoryName name, RepositoryKey key) throws DhtException, java.util.concurrent.TimeoutException
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.
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 |