|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.edg.data.reptor.catalog.ReplicaCatalogLrcOnlyImpl
The implementation of the high-level ReplicaCatalog interface using a single instance of each of the EDG replica location and replica metadata catalogs. The LFN is always checked for the 'lfn' schema and the GUID for the 'guid' schema. The SURL may not have more than one GUID and is always stored with the 'srm' schema. From this URI the SE needs to construct a valid transport file name with a real protocol and eventual changes to the SURL.
Constructor Summary | |
ReplicaCatalogLrcOnlyImpl(InfoService info)
Create a new Single LRC Replica Catalog. |
|
ReplicaCatalogLrcOnlyImpl(java.net.URI rlsUri,
java.net.URI rmcUri)
|
Method Summary | |
void |
addAlias(java.net.URI guid,
java.net.URI lfn)
add an alias to the rmc |
void |
addCatalogEntry(java.net.URI guid,
java.net.URI surl)
Create a new mapping in the catalog. |
void |
addFileInfo(java.net.URI guid,
java.net.URI surl,
FileInfo info,
boolean consistencyCheck)
Add the file info to the file identified by an SURL. |
void |
addLfnSurlMapping(java.net.URI lfn,
java.net.URI surl)
Create a logical name ot physical name mapping in the catalogs. |
boolean |
exists(java.net.URI uri)
Given a URI, check if it is in the grid catalogs. |
java.util.Set |
getAllStorageFileNames(java.net.URI file)
For this impl, the RLI is not there. |
FileInfo |
getFileInfo(java.net.URI file)
Get the file info of a given file. |
org.edg.data.rls.EdgLocalReplicaCatalog |
getLocalLRC()
|
java.util.Set |
getLocalStorageFileNames(java.net.URI file)
Returns the SURLs matching LFN or GUID in the LRC catalog. |
java.util.Set |
getLogicalFileNames(java.net.URI uri)
Retrieve all LFNs for a GUID, a SURL or an LFN. |
org.edg.data.rmc.EdgReplicaMetadataCatalog |
getRMC()
|
java.net.URI |
getSurlForHost(java.net.URI guid,
java.lang.String seHost)
|
void |
removeAlias(java.net.URI guid,
java.net.URI lfn)
remove an alias from the rmc |
void |
removeCatalogEntry(java.net.URI guid,
java.net.URI surl)
remove an entry from the local replica catalog |
void |
removeLfnSurlMapping(java.net.URI lfn,
java.net.URI surl)
Remove a mapping from lfn to surl in the catalog. |
void |
removeMetadataCatalogEntry(java.net.URI guid,
java.net.URI lfn)
Remove an entry from the Metadata Catalog. |
java.net.URI |
translateToGuid(java.net.URI uri)
Given a URI, find a guid that represents it, using the
grid catalogs if needed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReplicaCatalogLrcOnlyImpl(InfoService info)
info
- The InfoService
to get the RLS by.public ReplicaCatalogLrcOnlyImpl(java.net.URI rlsUri, java.net.URI rmcUri) throws CatalogCommunicationException
Method Detail |
public boolean exists(java.net.URI uri) throws CatalogCommunicationException
GUID
we check for it's existence in the replica location
catalog.
exists
in interface ReplicaCatalog
uri
- the uri to check for.
true
if the uri exists in the catalog.
CatalogCommunicationException
public java.net.URI translateToGuid(java.net.URI uri) throws CatalogCommunicationException, org.edg.data.util.InvalidFileTypeException, IllegalArgumentException, LfnDoesNotExistException, SurlDoesNotExistException, GUIDDoesNotExistException
guid
that represents it, using the
grid catalogs if needed.
translateToGuid
in interface ReplicaCatalog
uri
- the LFN or SURL to retrieve the GUID of
CatalogCommunicationException
- if the there is a problem with the
lookup
org.edg.data.util.InvalidFileTypeException
IllegalArgumentException
LfnDoesNotExistException
SurlDoesNotExistException
GUIDDoesNotExistException
public java.util.Set getLogicalFileNames(java.net.URI uri) throws CatalogCommunicationException, org.edg.data.util.InvalidFileTypeException, SurlDoesNotExistException, GUIDDoesNotExistException, IllegalArgumentException, LfnDoesNotExistException
null
if uri
is null
.
getLogicalFileNames
in interface ReplicaCatalog
uri
- the GUID, LFN or SURL to retrieve the LFNs of.
CatalogCommunicationException
- if the there is a problem with the
lookup.
org.edg.data.util.InvalidFileTypeException
- If the uri
is not a
recognised scheme
SurlDoesNotExistException
GUIDDoesNotExistException
IllegalArgumentException
LfnDoesNotExistException
public java.util.Set getLocalStorageFileNames(java.net.URI file) throws CatalogCommunicationException, org.edg.data.util.InvalidFileTypeException, GUIDDoesNotExistException, LfnDoesNotExistException, SurlDoesNotExistException
null
if an
invalid file type is specified.
getLocalStorageFileNames
in interface ReplicaCatalog
file
- the LFN or GUID or SURL to get all replica SURLs of. This
should not be null
CatalogCommunicationException
org.edg.data.util.InvalidFileTypeException
GUIDDoesNotExistException
LfnDoesNotExistException
SurlDoesNotExistException
public java.util.Set getAllStorageFileNames(java.net.URI file) throws CatalogCommunicationException, org.edg.data.util.InvalidFileTypeException, GUIDDoesNotExistException, SurlDoesNotExistException, LfnDoesNotExistException
getAllStorageFileNames
in interface ReplicaCatalog
file
- the LFN or GUID or SURL to get all replica SURLs of. This
should not be null
CatalogCommunicationException
org.edg.data.util.InvalidFileTypeException
GUIDDoesNotExistException
SurlDoesNotExistException
LfnDoesNotExistException
public void addCatalogEntry(java.net.URI guid, java.net.URI surl) throws CatalogCommunicationException, SurlExistsException, org.edg.data.util.InvalidFileTypeException
addCatalogEntry
in interface ReplicaCatalog
guid
- the guid to addsurl
- the surl it is mapped to
CatalogCommunicationException
- on failure
SurlExistsException
- surl already exists
org.edg.data.util.InvalidFileTypeException
public void addLfnSurlMapping(java.net.URI lfn, java.net.URI surl) throws org.edg.data.util.InvalidFileTypeException, CatalogCommunicationException, LfnExistsException, SurlDoesNotExistException, GUIDDoesNotExistException, IllegalArgumentException, LfnDoesNotExistException
addLfnSurlMapping
in interface ReplicaCatalog
lfn
- surl
-
org.edg.data.util.InvalidFileTypeException
CatalogCommunicationException
LfnExistsException
SurlDoesNotExistException
GUIDDoesNotExistException
IllegalArgumentException
LfnDoesNotExistException
public void removeLfnSurlMapping(java.net.URI lfn, java.net.URI surl) throws CatalogCommunicationException, SurlDoesNotExistException, LfnDoesNotExistException
removeLfnSurlMapping
in interface ReplicaCatalog
lfn
- surl
-
CatalogCommunicationException
- on failure
SurlDoesNotExistException
LfnDoesNotExistException
public void removeMetadataCatalogEntry(java.net.URI guid, java.net.URI lfn) throws CatalogCommunicationException
removeMetadataCatalogEntry
in interface ReplicaCatalog
guid
- The guid for the metadata catalog mapping to removelfn
- The alias for the mapping to remove
CatalogCommunicationException
public void removeCatalogEntry(java.net.URI guid, java.net.URI surl) throws CatalogCommunicationException, GUIDDoesNotExistException, IllegalArgumentException
removeCatalogEntry
in interface ReplicaCatalog
guid
- surl
-
CatalogCommunicationException
GUIDDoesNotExistException
IllegalArgumentException
public void addAlias(java.net.URI guid, java.net.URI lfn) throws org.edg.data.util.InvalidFileTypeException, CatalogCommunicationException, LfnExistsException
addAlias
in interface ReplicaCatalog
guid
- lfn
-
CatalogCommunicationException
org.edg.data.util.InvalidFileTypeException
LfnExistsException
public void removeAlias(java.net.URI guid, java.net.URI lfn) throws org.edg.data.util.InvalidFileTypeException, CatalogCommunicationException
removeAlias
in interface ReplicaCatalog
guid
- lfn
-
CatalogCommunicationException
org.edg.data.util.InvalidFileTypeException
public void addFileInfo(java.net.URI guid, java.net.URI surl, FileInfo info, boolean consistencyCheck) throws CatalogCommunicationException, org.edg.data.util.InvalidFileTypeException, InvalidInfoException, GUIDDoesNotExistException
addFileInfo
in interface ReplicaCatalog
surl
- an SURL.guid
- the GUID.info
-
CatalogCommunicationException
- if file does not exist.
org.edg.data.util.InvalidFileTypeException
InvalidInfoException
GUIDDoesNotExistException
public java.net.URI getSurlForHost(java.net.URI guid, java.lang.String seHost) throws CatalogCommunicationException, GUIDDoesNotExistException
getSurlForHost
in interface ReplicaCatalog
CatalogCommunicationException
GUIDDoesNotExistException
public FileInfo getFileInfo(java.net.URI file) throws CatalogCommunicationException, org.edg.data.util.InvalidFileTypeException, SurlDoesNotExistException, LfnDoesNotExistException
null
if file
does not exist.
getFileInfo
in interface ReplicaCatalog
file
- SURL, GUID or LFN.
CatalogCommunicationException
- if file is not valid or if
it does not exist.
org.edg.data.util.InvalidFileTypeException
SurlDoesNotExistException
LfnDoesNotExistException
public org.edg.data.rls.EdgLocalReplicaCatalog getLocalLRC() throws CatalogCommunicationException
getLocalLRC
in interface ReplicaCatalog
CatalogCommunicationException
public org.edg.data.rmc.EdgReplicaMetadataCatalog getRMC() throws CatalogCommunicationException
getRMC
in interface ReplicaCatalog
CatalogCommunicationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |