public class LocalRepoRegistry extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_KEY_EVICT_DEAD_ENTRIES_PERIOD |
static long |
DEFAULT_EVICT_DEAD_ENTRIES_PERIOD |
static String |
LOCAL_REPO_REGISTRY_FILE |
Modifier and Type | Method and Description |
---|---|
static LocalRepoRegistry |
getInstance() |
File |
getLocalRoot(UUID repositoryId) |
File |
getLocalRootForRepositoryName(String repositoryName)
Get the local root for the given
repositoryName . |
File |
getLocalRootForRepositoryNameOrFail(String repositoryName) |
File |
getLocalRootOrFail(UUID repositoryId) |
URL |
getLocalRootURLForRepositoryName(String repositoryName) |
URL |
getLocalRootURLForRepositoryNameOrFail(String repositoryName) |
protected Date |
getPropertyAsDate(String key) |
Collection<String> |
getRepositoryAliases(String repositoryName)
Gets all aliases known for the specified repository.
|
Collection<String> |
getRepositoryAliasesOrFail(String repositoryName)
Gets all aliases known for the specified repository.
|
UUID |
getRepositoryId(String repositoryName) |
UUID |
getRepositoryIdOrFail(String repositoryName) |
Collection<UUID> |
getRepositoryIds() |
void |
putRepository(UUID repositoryId,
File localRoot) |
void |
putRepositoryAlias(String repositoryAlias,
UUID repositoryId)
Puts an alias into the registry.
|
void |
removeRepositoryAlias(String repositoryAlias) |
public static final String LOCAL_REPO_REGISTRY_FILE
public static final String CONFIG_KEY_EVICT_DEAD_ENTRIES_PERIOD
public static final long DEFAULT_EVICT_DEAD_ENTRIES_PERIOD
public static LocalRepoRegistry getInstance()
public Collection<UUID> getRepositoryIds()
public UUID getRepositoryId(String repositoryName)
public UUID getRepositoryIdOrFail(String repositoryName)
public URL getLocalRootURLForRepositoryNameOrFail(String repositoryName)
public URL getLocalRootURLForRepositoryName(String repositoryName)
public File getLocalRootForRepositoryNameOrFail(String repositoryName)
public File getLocalRootForRepositoryName(String repositoryName)
repositoryName
.repositoryName
- the String-representation of the repositoryId or
a repositoryAlias. Must not be null
.null
, if the given repositoryName
is neither
a repositoryId nor a repositoryAlias known to this registry.public File getLocalRoot(UUID repositoryId)
public File getLocalRootOrFail(UUID repositoryId)
public void putRepositoryAlias(String repositoryAlias, UUID repositoryId)
Important: Do not call this method directly. Most likely, you should use
LocalRepoManager.putRepositoryAlias(String)
instead!
repositoryAlias
- repositoryId
- public void removeRepositoryAlias(String repositoryAlias)
public void putRepository(UUID repositoryId, File localRoot)
protected Date getPropertyAsDate(String key)
public Collection<String> getRepositoryAliasesOrFail(String repositoryName) throws IllegalArgumentException
repositoryName
- the repository-ID or -alias. Must not be null
.null
, but maybe empty (if there are no aliases for this repository).IllegalArgumentException
- if the repository with the given repositoryName
does not exist,
i.e. it's neither a repository-ID nor a repository-alias of a known repository.public Collection<String> getRepositoryAliases(String repositoryName)
repositoryName
- the repository-ID or -alias. Must not be null
.null
, if there is no repository with
the given repositoryName
. Empty, if the repository is known, but there
are no aliases for it.Copyright © 2013-2014. All Rights Reserved.