Class IRODSReplicas

java.lang.Object
org.irods.irods4j.high_level.vfs.IRODSReplicas

public class IRODSReplicas extends Object
A class providing high-level data types and functions for working with replicas.
Since:
0.1.0
  • Field Details

    • asAdmin

      public static final AdminTag 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:
      IRODSException
      IOException
      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:
      IRODSException
      IOException
      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:
      IOException
      IRODSException
      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:
      IOException
      IRODSException
      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:
      IOException
      IRODSException
      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:
      IOException
      IRODSException
      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:
      IOException
      IRODSException
      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:
      IOException
      IRODSException
      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:
      IOException
      IRODSException
      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:
      IOException
      IRODSException
      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:
      IOException
      IRODSException
      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:
      IOException
      IRODSException
      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:
      IOException
      IRODSException
      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:
      IOException
      IRODSException
      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:
      IRODSException
      IOException
      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:
      IRODSException
      IOException
      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:
      IOException
      com.fasterxml.jackson.core.JsonProcessingException
      IRODSException
      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:
      IOException
      com.fasterxml.jackson.core.JsonProcessingException
      IRODSException
      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:
      IRODSException
      IOException
      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:
      IRODSException
      IOException
      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:
      IRODSException
      IOException
      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:
      IRODSException
      IOException
      Since:
      0.1.0