Package com.saperion.rmi.storage
Class Medium
- java.lang.Object
- 
- com.saperion.rmi.storage.Medium
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 
 public class Medium extends java.lang.Object implements java.io.SerializableHolds information about a medium.- Author:
- jschwarz
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description Medium(MediumId id, java.lang.String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, boolean isContainer, ContainerTrigger containerTrigger, java.util.List<java.lang.String> plugins)Literal constructor.Medium(MediumId id, java.lang.String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, ContainerTrigger containerTrigger, java.util.List<java.lang.String> plugins)Literal constructor for container media.Medium(MediumId id, java.lang.String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, java.util.List<java.lang.String> plugins)Literal constructor for non-container media.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MediumfromNative(com.saperion.jna.applsrv.m2j.natives.MediumInfoType mediumInfoType)Constructs an instance ofMediumfrom a given wrapper of the corresponding native type.MediumAccessDatagetAccessData()ContainerTriggergetContainerTrigger()MediumFillStategetFillState()MediumIdgetId()MirrorTypegetMirror()java.lang.StringgetName()java.util.List<java.lang.String>getPlugins()MediumTypegetType()booleanhashesContent()Whether the medium is a "hashing" medium.booleanisConflicted()booleanisContainer()booleanisMigrated()booleanisProtected()java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
Mediumpublic Medium(MediumId id, java.lang.String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, ContainerTrigger containerTrigger, java.util.List<java.lang.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()
 
 - 
Mediumpublic Medium(MediumId id, java.lang.String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, java.util.List<java.lang.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()
 
 - 
Mediumpublic Medium(MediumId id, java.lang.String name, MediumType type, MirrorType mirror, MediumFillState fillState, MediumAccessData accessData, boolean isProtected, boolean isMigrated, boolean hashesContent, boolean isConflicted, boolean isContainer, ContainerTrigger containerTrigger, java.util.List<java.lang.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 Detail- 
fromNativepublic static Medium fromNative(com.saperion.jna.applsrv.m2j.natives.MediumInfoType mediumInfoType) Constructs an instance ofMediumfrom a given wrapper of the corresponding native type.- Parameters:
- mediumInfoType- An instance of MediumInfoType corresponding to the same medium.
- Returns:
- The instance of Mediumcorresponding to the same medium a the given MediumInfoType does.
 
 - 
getIdpublic MediumId getId() - Returns:
- The id of the given medium that is unique in one saperion system.
 
 - 
getNamepublic java.lang.String getName() - Returns:
- The name of the given medium.
 
 - 
getTypepublic MediumType getType() - Returns:
- what type of medium this is.
 
 - 
getMirrorpublic MirrorType getMirror() - Returns:
- The type of mirror medium this medium is (or none if it is not a mirror medium)
 
 - 
getFillStatepublic MediumFillState getFillState() - Returns:
- Information about the size of the medium and how much space is already used.
 
 - 
getAccessDatapublic MediumAccessData getAccessData() - Returns:
- Information about access times of the medium
 
 - 
isProtectedpublic boolean isProtected() - Returns:
- whether the medium is write protected
 
 - 
isMigratedpublic boolean isMigrated() - Returns:
- whether this is a migration medium
 
 - 
hashesContentpublic 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
 
 - 
isConflictedpublic boolean isConflicted() - Returns:
- whether this medium is closed due to an error
 
 - 
isContainerpublic boolean isContainer() - Returns:
- whether this is a container medium
 
 - 
getContainerTriggerpublic ContainerTrigger getContainerTrigger() - Returns:
- If this is a container medium this holds information about when the generation of the next container item will be triggered.
 
 - 
getPluginspublic java.util.List<java.lang.String> getPlugins() - Returns:
- The names of the plugins linked to this medium
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-