|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFreeSpaceList
The response to a IBackend.queryFreeSpaceList(boolean)
request.
// query freespace for all hosts IFreeSpaceList freeSpaceList = backend.queryFreeSpaceList(true); // print the summary System.out.println(String.format( "MythTV has used %s space out of %s used on %d storage groups.", EncodingUtils.getFormattedFileSize(freeSpaceList.getUsedSpace()), EncodingUtils.getFormattedFileSize(freeSpaceList.getTotalSpace()), freeSpaceList.size() )); // print details for each storage group for (IFreeSpaceListEntry entry : freeSpaceList) { System.out.println(String.format( "- %s : %s space out of %s used", entry.getDirectories(), EncodingUtils.getFormattedFileSize(entry.getUsedSpace()), EncodingUtils.getFormattedFileSize(entry.getTotalSpace()) )); }
MythTV has used 3,17 GB space out of 3,72 GB used on 2 storage groups. - [mythbox:/mnt/data/mythpinky] : 3,14 GB space out of 3,58 GB used - [mythbox:/var/lib/mythtv/livetv, mythbox:/var/lib/mythtv/recordings] : 28,00 MB space out of 137,93 MB used
<00>HOSTNAME: mythbox | <01>DIRECTORIES: mythbox:/mnt/data/mythpinky | <02>IS_LOCAL: false | <03>FILESYSTEM_ID: 1 | <04>STORAGE_GROUP_ID: 12 | <05>BLOCK_SIZE: 131072 | <06>TOTAL_SPACE1: 0 | <07>TOTAL_SPACE2: 1922845568 | <08>USED_SPACE1: 0 | <09>USED_SPACE2: 1814276224
<00>HOSTNAME: mythbox | <01>DIRECTORIES: mythbox:/var/lib/mythtv/livetv,mythbox:/var/lib/mythtv/recordings | <02>IS_LOCAL: true | <03>FILESYSTEM_ID: 2 | <04>STORAGE_GROUP_ID: 11 | <05>BLOCK_SIZE: 4096 | <06>TOTAL_SPACE1: 0 | <07>TOTAL_SPACE2: 144629480 | <08>USED_SPACE1: 0 | <09>USED_SPACE2: 43545660
IBackend.queryFreeSpaceList(boolean)
,
QUERY_FREE_SPACE_LIST
Method Summary | |
---|---|
List<IFreeSpaceListEntry> |
asList()
Returns a list, containing one entry for each backend storage-group. |
IFreeSpaceListEntry |
get(int idx)
Gets the entry at the given index. |
Long |
getFreeSpace()
Gets the free space on file system. |
Long |
getTotalSpace()
Gets the total space on file system. |
Long |
getUsedSpace()
Gets the used space on file system. |
int |
size()
Returns the number of entries contained in this list |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Methods inherited from interface org.jmythapi.IVersionable |
---|
getVersionNr |
Method Detail |
---|
Long getTotalSpace()
getTotalSpace
in interface IBasicFreeSpace
Long getUsedSpace()
getUsedSpace
in interface IBasicFreeSpace
Long getFreeSpace()
getFreeSpace
in interface IBasicFreeSpace
List<IFreeSpaceListEntry> asList()
IFreeSpaceListEntry get(int idx)
idx
- the index of the entry
int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |