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.StringgetFileSystemType()Gets the file system type.longgetFreeBytes()Gets the free bytes.java.lang.StringgetLocation()Gets the location.intgetPercentUsed()Gets the percent used.longgetTotalBytes()Gets the total bytes.longgetUsedBytes()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:
getLocationin interfaceIDiskSpace- Returns:
- the location
- See Also:
IDiskSpace.getLocation()
-
getUsedBytes
public long getUsedBytes()
Gets the used bytes.- Specified by:
getUsedBytesin interfaceIDiskSpace- Returns:
- the used bytes
- See Also:
IDiskSpace.getUsedBytes()
-
getFreeBytes
public long getFreeBytes()
Gets the free bytes.- Specified by:
getFreeBytesin interfaceIDiskSpace- Returns:
- the free bytes
- See Also:
IDiskSpace.getFreeBytes()
-
getTotalBytes
public long getTotalBytes()
Gets the total bytes.- Specified by:
getTotalBytesin interfaceIDiskSpace- Returns:
- the total bytes
- See Also:
IDiskSpace.getTotalBytes()
-
getPercentUsed
public int getPercentUsed()
Gets the percent used.- Specified by:
getPercentUsedin interfaceIDiskSpace- Returns:
- the percent used
- See Also:
IDiskSpace.getPercentUsed()
-
getFileSystemType
public java.lang.String getFileSystemType()
Gets the file system type.- Specified by:
getFileSystemTypein interfaceIDiskSpace- Returns:
- the file system type
- See Also:
IDiskSpace.getFileSystemType()
-
-