org.jmythapi.protocol.response.impl
Class FreeSpaceList
java.lang.Object
org.jmythapi.impl.AData<E>
org.jmythapi.protocol.response.impl.AMythResponse<E>
org.jmythapi.protocol.response.impl.AFreeSpace<FreeSpaceList.Props>
org.jmythapi.protocol.response.impl.FreeSpaceList
- All Implemented Interfaces:
- Cloneable, Iterable<IFreeSpaceListEntry>, IPropertyAware<FreeSpaceList.Props>, IVersionable, ISendable, IBasicFreeSpace, IFreeSpaceList, IMythResponse<FreeSpaceList.Props>
public class FreeSpaceList
- extends AFreeSpace<FreeSpaceList.Props>
- implements Iterable<IFreeSpaceListEntry>, IFreeSpaceList
- Since:
- 17
Methods inherited from class org.jmythapi.impl.AData |
clone, equals, getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValueObject, getPropertyValues, getVersionNr, hashCode, init, postProcessArguments, setPropertyValue, setPropertyValue, setPropertyValueObject |
FreeSpaceList
public FreeSpaceList(IMythPacket packet)
checkSize
protected void checkSize(List<String> responseArgs)
throws IllegalArgumentException
- The size of the response array must be a multiple of
IFreeSpaceListEntry.EntryProps.values().size()
.
There is no size value at the beginning of the response list (e.g. as available for program-lists).
- Overrides:
checkSize
in class AMythResponse<FreeSpaceList.Props>
- Parameters:
responseArgs
- the response-argument-list
- Throws:
IllegalArgumentException
- if expected arguments are missing.
getTotalSpace
public Long getTotalSpace()
- Description copied from interface:
IBasicFreeSpace
- Gets the total space on file system.
- Specified by:
getTotalSpace
in interface IBasicFreeSpace
- Specified by:
getTotalSpace
in interface IFreeSpaceList
- Specified by:
getTotalSpace
in class AFreeSpace<FreeSpaceList.Props>
- Returns:
- total space
getUsedSpace
public Long getUsedSpace()
- Description copied from interface:
IBasicFreeSpace
- Gets the used space on file system.
- Specified by:
getUsedSpace
in interface IBasicFreeSpace
- Specified by:
getUsedSpace
in interface IFreeSpaceList
- Specified by:
getUsedSpace
in class AFreeSpace<FreeSpaceList.Props>
- Returns:
- used space
asList
public List<IFreeSpaceListEntry> asList()
- Description copied from interface:
IFreeSpaceList
- Returns a list, containing one entry for each backend storage-group.
- Specified by:
asList
in interface IFreeSpaceList
- Returns:
- a list of entries.
get
public IFreeSpaceListEntry get(int idx)
- Description copied from interface:
IFreeSpaceList
- Gets the entry at the given index.
- Specified by:
get
in interface IFreeSpaceList
- Parameters:
idx
- the index of the entry
- Returns:
- the entry
size
public int size()
- Description copied from interface:
IFreeSpaceList
- Returns the number of entries contained in this list
- Specified by:
size
in interface IFreeSpaceList
- Returns:
- the list size
iterator
public Iterator<IFreeSpaceListEntry> iterator()
- Specified by:
iterator
in interface Iterable<IFreeSpaceListEntry>
toString
public String toString()
- Description copied from class:
AData
Returns the content of this data object as a formatted string.
E.g.
<0>TOTAL_RAM_MB: 1002 | <1>FREE_RAM_MB: 474 | <2>TOTAL_VM_MB: 853 | <3>FREE_VM_MB: 853
- Overrides:
toString
in class AData<FreeSpaceList.Props>
Copyright © 2008-2013. All Rights Reserved.