Package com.saperion.rmi.storage
Class Medium
java.lang.Object
com.saperion.rmi.storage.Medium
- All Implemented Interfaces:
Serializable
Holds information about a medium.
- Author:
- jschwarz
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMedium
(MediumId id, String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, boolean isContainer, ContainerTrigger containerTrigger, List<String> plugins) Literal constructor.Medium
(MediumId id, String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, ContainerTrigger containerTrigger, List<String> plugins) Literal constructor for container media.Medium
(MediumId id, String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, List<String> plugins) Literal constructor for non-container media. -
Method Summary
Modifier and TypeMethodDescriptionstatic Medium
fromNative
(com.saperion.jna.applsrv.m2j.natives.MediumInfoType mediumInfoType) Constructs an instance ofMedium
from a given wrapper of the corresponding native type.getId()
getName()
getType()
boolean
Whether the medium is a "hashing" medium.boolean
boolean
boolean
boolean
toString()
-
Constructor Details
-
Medium
public Medium(MediumId id, String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, ContainerTrigger containerTrigger, List<String> plugins) Literal constructor for container media.- Parameters:
id
-getId()
name
-getName()
type
-getType()
mirror
-getMirror()
fillState
-getFillState()
accessData
-getAccessData()
isProtected
-isProtected()
isMigrated
-isMigrated()
hashesContent
-hashesContent()
isConflicted
-isConflicted()
containerTrigger
-getContainerTrigger()
plugins
-getPlugins()
-
Medium
public Medium(MediumId id, String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, List<String> plugins) Literal constructor for non-container media.- Parameters:
id
-getId()
name
-getName()
type
-getType()
mirror
-getMirror()
fillState
-getFillState()
accessData
-getAccessData()
isProtected
-isProtected()
isMigrated
-isMigrated()
hashesContent
-hashesContent()
isConflicted
-isConflicted()
plugins
-getPlugins()
-
Medium
public Medium(MediumId id, String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, boolean isContainer, ContainerTrigger containerTrigger, List<String> plugins) Literal constructor. No Parameter is allowed to be null.- Parameters:
id
-getId()
name
-getName()
type
-getType()
mirror
-getMirror()
fillState
-getFillState()
accessData
-getAccessData()
isProtected
-isProtected()
isMigrated
-isMigrated()
hashesContent
-hashesContent()
isConflicted
-isConflicted()
isContainer
-isContainer()
containerTrigger
-getContainerTrigger()
plugins
-getPlugins()
-
-
Method Details
-
fromNative
Constructs an instance ofMedium
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
- Returns:
- The id of the given medium that is unique in one saperion system.
-
getName
- Returns:
- The name of the given medium.
-
getType
- Returns:
- what type of medium this is.
-
getMirror
- Returns:
- The type of mirror medium this medium is (or none if it is not a mirror medium)
-
getFillState
- Returns:
- Information about the size of the medium and how much space is already used.
-
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
- Returns:
- If this is a container medium this holds information about when the generation of the next container item will be triggered.
-
getPlugins
- Returns:
- The names of the plugins linked to this medium
-
toString
-