Class Medium

  • All Implemented Interfaces:
    java.io.Serializable

    public class Medium
    extends java.lang.Object
    implements java.io.Serializable
    Holds information about a medium.
    Author:
    jschwarz
    See Also:
    Serialized Form
    • Method Detail

      • fromNative

        public static Medium fromNative​(com.saperion.jna.applsrv.m2j.natives.MediumInfoType mediumInfoType)
        Constructs an instance of Medium from a given wrapper of the corresponding native type.
        Parameters:
        mediumInfoType - An instance of MediumInfoType corresponding to the same medium.
        Returns:
        The instance of Medium corresponding to the same medium a the given MediumInfoType does.
      • getId

        public MediumId getId()
        Returns:
        The id of the given medium that is unique in one saperion system.
      • getName

        public java.lang.String getName()
        Returns:
        The name of the given medium.
      • getType

        public MediumType getType()
        Returns:
        what type of medium this is.
      • getMirror

        public MirrorType getMirror()
        Returns:
        The type of mirror medium this medium is (or none if it is not a mirror medium)
      • getFillState

        public MediumFillState getFillState()
        Returns:
        Information about the size of the medium and how much space is already used.
      • getAccessData

        public MediumAccessData getAccessData()
        Returns:
        Information about access times of the medium
      • isProtected

        public boolean isProtected()
        Returns:
        whether the medium is write protected
      • isMigrated

        public boolean isMigrated()
        Returns:
        whether this is a migration medium
      • hashesContent

        public boolean hashesContent()
        Whether the medium is a "hashing" medium. Such a medium computes and stores a cryptographic hash of binary content stored to it. Should content be requested to be stored on this medium that has the same hash as content already stored on the medium it will not written double.
        Returns:
        whether this medium is a hashing medium
      • isConflicted

        public boolean isConflicted()
        Returns:
        whether this medium is closed due to an error
      • isContainer

        public boolean isContainer()
        Returns:
        whether this is a container medium
      • getContainerTrigger

        public ContainerTrigger getContainerTrigger()
        Returns:
        If this is a container medium this holds information about when the generation of the next container item will be triggered.
      • getPlugins

        public java.util.List<java.lang.String> getPlugins()
        Returns:
        The names of the plugins linked to this medium
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object