Class DiskSpace
- java.lang.Object
-
- com.perforce.p4java.impl.generic.admin.DiskSpace
-
- All Implemented Interfaces:
IDiskSpace
public class DiskSpace extends java.lang.Object implements IDiskSpace
Default implementation of the IDiskSpace interface.
-
-
Constructor Summary
Constructors Constructor Description DiskSpace(java.lang.String location, long usedBytes, long freeBytes, long totalBytes, int percentageUsed, java.lang.String fileSystemType)
Instantiates a new disk space.DiskSpace(java.util.Map<java.lang.String,java.lang.Object> map)
Constructs a DiskSpace from the passed-in map; this map must have come from a Perforce IServer method call or it may fail.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFileSystemType()
Gets the file system type.long
getFreeBytes()
Gets the free bytes.java.lang.String
getLocation()
Gets the location.int
getPercentUsed()
Gets the percent used.long
getTotalBytes()
Gets the total bytes.long
getUsedBytes()
Gets the used bytes.
-
-
-
Constructor Detail
-
DiskSpace
public DiskSpace(java.lang.String location, long usedBytes, long freeBytes, long totalBytes, int percentageUsed, java.lang.String fileSystemType)
Instantiates a new disk space.- Parameters:
location
- the locationusedBytes
- the used bytesfreeBytes
- the free bytestotalBytes
- the total bytespercentageUsed
- the percentage usedfileSystemType
- the file system type
-
DiskSpace
public DiskSpace(java.util.Map<java.lang.String,java.lang.Object> map)
Constructs a DiskSpace from the passed-in map; this map must have come from a Perforce IServer method call or it may fail. If map is null, equivalent to calling the default constructor.- Parameters:
map
- the map
-
-
Method Detail
-
getLocation
public java.lang.String getLocation()
Gets the location.- Specified by:
getLocation
in interfaceIDiskSpace
- Returns:
- the location
- See Also:
IDiskSpace.getLocation()
-
getUsedBytes
public long getUsedBytes()
Gets the used bytes.- Specified by:
getUsedBytes
in interfaceIDiskSpace
- Returns:
- the used bytes
- See Also:
IDiskSpace.getUsedBytes()
-
getFreeBytes
public long getFreeBytes()
Gets the free bytes.- Specified by:
getFreeBytes
in interfaceIDiskSpace
- Returns:
- the free bytes
- See Also:
IDiskSpace.getFreeBytes()
-
getTotalBytes
public long getTotalBytes()
Gets the total bytes.- Specified by:
getTotalBytes
in interfaceIDiskSpace
- Returns:
- the total bytes
- See Also:
IDiskSpace.getTotalBytes()
-
getPercentUsed
public int getPercentUsed()
Gets the percent used.- Specified by:
getPercentUsed
in interfaceIDiskSpace
- Returns:
- the percent used
- See Also:
IDiskSpace.getPercentUsed()
-
getFileSystemType
public java.lang.String getFileSystemType()
Gets the file system type.- Specified by:
getFileSystemType
in interfaceIDiskSpace
- Returns:
- the file system type
- See Also:
IDiskSpace.getFileSystemType()
-
-