com.perforce.p4java.impl.generic.admin
Class DiskSpace

java.lang.Object
  extended by com.perforce.p4java.impl.generic.admin.DiskSpace
All Implemented Interfaces:
IDiskSpace

public class DiskSpace
extends Object
implements IDiskSpace

Default implementation of the IDiskSpace interface.


Constructor Summary
DiskSpace(Map<String,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.
DiskSpace(String location, long usedBytes, long freeBytes, long totalBytes, int percentageUsed, String fileSystemType)
          Instantiates a new disk space.
 
Method Summary
 String getFileSystemType()
          Gets the file system type.
 long getFreeBytes()
          Gets the free bytes.
 String getLocation()
          Gets the location.
 int getPercentUsed()
          Gets the percent used.
 long getTotalBytes()
          Gets the total bytes.
 long getUsedBytes()
          Gets the used bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskSpace

public DiskSpace(String location,
                 long usedBytes,
                 long freeBytes,
                 long totalBytes,
                 int percentageUsed,
                 String fileSystemType)
Instantiates a new disk space.

Parameters:
location - the location
usedBytes - the used bytes
freeBytes - the free bytes
totalBytes - the total bytes
percentageUsed - the percentage used
fileSystemType - the file system type

DiskSpace

public DiskSpace(Map<String,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 String getLocation()
Gets the location.

Specified by:
getLocation in interface IDiskSpace
Returns:
the location
See Also:
IDiskSpace.getLocation()

getUsedBytes

public long getUsedBytes()
Gets the used bytes.

Specified by:
getUsedBytes in interface IDiskSpace
Returns:
the used bytes
See Also:
IDiskSpace.getUsedBytes()

getFreeBytes

public long getFreeBytes()
Gets the free bytes.

Specified by:
getFreeBytes in interface IDiskSpace
Returns:
the free bytes
See Also:
IDiskSpace.getFreeBytes()

getTotalBytes

public long getTotalBytes()
Gets the total bytes.

Specified by:
getTotalBytes in interface IDiskSpace
Returns:
the total bytes
See Also:
IDiskSpace.getTotalBytes()

getPercentUsed

public int getPercentUsed()
Gets the percent used.

Specified by:
getPercentUsed in interface IDiskSpace
Returns:
the percent used
See Also:
IDiskSpace.getPercentUsed()

getFileSystemType

public String getFileSystemType()
Gets the file system type.

Specified by:
getFileSystemType in interface IDiskSpace
Returns:
the file system type
See Also:
IDiskSpace.getFileSystemType()


Copyright © 2015 Perforce Software. All Rights Reserved.