Package org.irods.irods4j.high_level.vfs
Class IRODSReplicas
java.lang.Object
org.irods.irods4j.high_level.vfs.IRODSReplicas
A class providing high-level data types and functions for working with
replicas.
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines values which influence the behavior of checksum calculations. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longlastWriteTime(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) Returns the modification time of a replica.static voidlastWriteTime(IRODSApi.RcComm comm, String logicalPath, long replicaNumber, long newTime) Sets the modification time of a replica.static longlastWriteTime(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) Returns the modification time of a replica.static voidlastWriteTime(IRODSApi.RcComm comm, String logicalPath, String leafResourceName, long newTime) Sets the modification time of a replica.static StringreplicaChecksum(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, long replicaNumber, IRODSReplicas.VerificationCalculation calculation) Optionally calculates and returns the checksum of a replica.static StringreplicaChecksum(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String leafResourceName, IRODSReplicas.VerificationCalculation calculation) Optionally calculates and returns the checksum of a replica.static StringreplicaChecksum(IRODSApi.RcComm comm, String logicalPath, long replicaNumber, IRODSReplicas.VerificationCalculation calculation) Optionally calculates and returns the checksum of a replica.static StringreplicaChecksum(IRODSApi.RcComm comm, String logicalPath, String leafResourceName, IRODSReplicas.VerificationCalculation calculation) Optionally calculates and returns the checksum of a replica.static booleanreplicaExists(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) Checks if a replica exists in the catalog.static booleanreplicaExists(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) Checks if a replica exists in the catalog.static longreplicaSize(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) Returns the size of a replica in the catalog.static longreplicaSize(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) Returns the size of a replica in the catalog.static longreplicaSizeInStorage(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) Returns the physical size of a replica in storage.static longreplicaSizeInStorage(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) Returns the physical size of a replica in storage.static voidreplicateReplica(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, int srcReplicaNumber, String dstResourceName) Replicates a replica to a resource.static voidreplicateReplica(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String srcResourceName, String dstResourceName) Replicates a replica to a resource.static voidreplicateReplica(IRODSApi.RcComm comm, String logicalPath, int srcReplicaNumber, String dstResourceName) Replicates a replica to a resource.static voidreplicateReplica(IRODSApi.RcComm comm, String logicalPath, String srcResourceName, String dstResourceName) Replicates a replica to a resource.static StringtoLeafResource(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) Returns the name of the leaf resource which holds a replica.static longtoReplicaNumber(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) Returns the replica number of a replica.static voidtrimReplica(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, long replicaNumber) Trims a replica.static voidtrimReplica(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String leafResourceName) Trims a replica.static voidtrimReplica(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) Trims a replica.static voidtrimReplica(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) Trims a replica.
-
Field Details
-
asAdmin
Instructs the server to execute operations using rodsadmin level privileges.- Since:
- 0.1.0
-
-
Constructor Details
-
IRODSReplicas
public IRODSReplicas()
-
-
Method Details
-
replicaSize
public static long replicaSize(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) throws IOException, IRODSException Returns the size of a replica in the catalog.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to a data object.replicaNumber- The replica number of the target replica.- Returns:
- An integer representing the size.
- Throws:
IRODSExceptionIOException- Since:
- 0.1.0
-
replicaSize
public static long replicaSize(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) throws IOException, IRODSException Returns the size of a replica in the catalog.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to a data object.leafResourceName- The resource holding the target replica.- Returns:
- An integer representing the size.
- Throws:
IRODSExceptionIOException- Since:
- 0.1.0
-
replicaSizeInStorage
public static long replicaSizeInStorage(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) Returns the physical size of a replica in storage.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to a data object.replicaNumber- The replica number of the target replica.- Returns:
- An integer representing the size.
- Since:
- 0.1.0
-
replicaSizeInStorage
public static long replicaSizeInStorage(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) Returns the physical size of a replica in storage.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to a data object.leafResourceName- The resource holding the target replica.- Returns:
- An integer representing the size.
- Since:
- 0.1.0
-
replicateReplica
public static void replicateReplica(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, int srcReplicaNumber, String dstResourceName) throws IOException, IRODSException Replicates a replica to a resource.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the source replica.srcReplicaNumber- The replica number of the source replica to read from.dstResourceName- The root resource to replicate the data to.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
replicateReplica
public static void replicateReplica(IRODSApi.RcComm comm, String logicalPath, int srcReplicaNumber, String dstResourceName) throws IOException, IRODSException Replicates a replica to a resource.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the source replica.srcReplicaNumber- The replica number of the source replica to read from.dstResourceName- The root resource to replicate the data to.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
replicateReplica
public static void replicateReplica(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String srcResourceName, String dstResourceName) throws IOException, IRODSException Replicates a replica to a resource.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the source replica.srcResourceName- The resource of the source replica to read from.dstResourceName- The root resource to replicate the data to.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
replicateReplica
public static void replicateReplica(IRODSApi.RcComm comm, String logicalPath, String srcResourceName, String dstResourceName) throws IOException, IRODSException Replicates a replica to a resource.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the source replica.srcResourceName- The resource of the source replica to read from.dstResourceName- The root resource to replicate the data to.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
trimReplica
public static void trimReplica(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, long replicaNumber) throws IOException, IRODSException Trims a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the target replica.replicaNumber- The replica number of the replica to trim.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
trimReplica
public static void trimReplica(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) throws IOException, IRODSException Trims a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the target replica.replicaNumber- The replica number of the replica to trim.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
trimReplica
public static void trimReplica(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String leafResourceName) throws IOException, IRODSException Trims a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the target replica.leafResourceName- The resource holding the replica to trim.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
trimReplica
public static void trimReplica(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) throws IOException, IRODSException Trims a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the target replica.leafResourceName- The resource holding the replica to trim.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
replicaChecksum
public static String replicaChecksum(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, long replicaNumber, IRODSReplicas.VerificationCalculation calculation) throws IOException, IRODSException Optionally calculates and returns the checksum of a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the source replica.replicaNumber- The replica number of the replica to checksum.calculation- An option which influences the behavior of the checksum operation.- Returns:
- A string representing the checksum.
- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
replicaChecksum
public static String replicaChecksum(IRODSApi.RcComm comm, String logicalPath, long replicaNumber, IRODSReplicas.VerificationCalculation calculation) throws IOException, IRODSException Optionally calculates and returns the checksum of a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the source replica.replicaNumber- The replica number of the replica to checksum.calculation- An option which influences the behavior of the checksum operation.- Returns:
- A string representing the checksum.
- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
replicaChecksum
public static String replicaChecksum(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String leafResourceName, IRODSReplicas.VerificationCalculation calculation) throws IOException, IRODSException Optionally calculates and returns the checksum of a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the source replica.leafResourceName- The resource holding the target replica.calculation- An option which influences the behavior of the checksum operation.- Returns:
- A string representing the checksum.
- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
replicaChecksum
public static String replicaChecksum(IRODSApi.RcComm comm, String logicalPath, String leafResourceName, IRODSReplicas.VerificationCalculation calculation) throws IOException, IRODSException Optionally calculates and returns the checksum of a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the source replica.leafResourceName- The resource holding the target replica.calculation- An option which influences the behavior of the checksum operation.- Returns:
- A string representing the checksum.
- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
lastWriteTime
public static long lastWriteTime(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) throws IOException, IRODSException Returns the modification time of a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the replica.replicaNumber- The replica number of the target replica.- Returns:
- An integer representing the time.
- Throws:
IRODSExceptionIOException- Since:
- 0.1.0
-
lastWriteTime
public static long lastWriteTime(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) throws IOException, IRODSException Returns the modification time of a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the replica.leafResourceName- The resource holding the target replica.- Returns:
- An integer representing the time.
- Throws:
IRODSExceptionIOException- Since:
- 0.1.0
-
lastWriteTime
public static void lastWriteTime(IRODSApi.RcComm comm, String logicalPath, long replicaNumber, long newTime) throws com.fasterxml.jackson.core.JsonProcessingException, IOException, IRODSException Sets the modification time of a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the replica.replicaNumber- The replica number of the target replica.newTime- The new modification time in seconds since epoch.- Throws:
IOExceptioncom.fasterxml.jackson.core.JsonProcessingExceptionIRODSException- Since:
- 0.1.0
-
lastWriteTime
public static void lastWriteTime(IRODSApi.RcComm comm, String logicalPath, String leafResourceName, long newTime) throws com.fasterxml.jackson.core.JsonProcessingException, IOException, IRODSException Sets the modification time of a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the replica.leafResourceName- The resource holding the target replica.newTime- The new modification time in seconds since epoch.- Throws:
IOExceptioncom.fasterxml.jackson.core.JsonProcessingExceptionIRODSException- Since:
- 0.1.0
-
toReplicaNumber
public static long toReplicaNumber(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) throws IOException, IRODSException Returns the replica number of a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the replica.leafResourceName- The resource holding the target replica.- Returns:
- An integer representing the replica number.
- Throws:
IRODSExceptionIOException- Since:
- 0.1.0
-
toLeafResource
public static String toLeafResource(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) throws IOException, IRODSException Returns the name of the leaf resource which holds a replica.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the replica.replicaNumber- The replica number of the target replica.- Returns:
- A string representing the resource name.
- Throws:
IRODSExceptionIOException- Since:
- 0.1.0
-
replicaExists
public static boolean replicaExists(IRODSApi.RcComm comm, String logicalPath, long replicaNumber) throws IOException, IRODSException Checks if a replica exists in the catalog.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the replica.replicaNumber- The replica number of the target replica.- Returns:
- A boolean indicating whether the target replica exists.
- Throws:
IRODSExceptionIOException- Since:
- 0.1.0
-
replicaExists
public static boolean replicaExists(IRODSApi.RcComm comm, String logicalPath, String leafResourceName) throws IOException, IRODSException Checks if a replica exists in the catalog.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute path to the data object which owns the replica.leafResourceName- The resource holding the target replica.- Returns:
- A boolean indicating whether the target replica exists.
- Throws:
IRODSExceptionIOException- Since:
- 0.1.0
-