コード例 #1
0
ファイル: Partition.java プロジェクト: haught/openafs
 /**
  * Refreshes the properties of this Partition object instance with values from the AFS partition
  * it represents. If <CODE>all</CODE> is <CODE>true</CODE> then <U>all</U> of the properties of
  * this Partition object instance will be set, or renewed, according to the values of the AFS
  * partition it represents, disregarding any previously set properties.
  *
  * <p>Thus, if <CODE>all</CODE> is <CODE>false</CODE> then properties that are currently set will
  * be refreshed and properties that are not set will remain uninitialized. See {@link #refresh()}
  * for more information.
  *
  * @param all if true set or renew all object properties; otherwise renew all set properties
  * @exception AFSException If an error occurs in the native code
  * @see #refresh()
  */
 protected void refresh(boolean all) throws AFSException {
   if (all || volumes != null) {
     refreshVolumes();
   }
   if (all || volumeNames != null) {
     refreshVolumeNames();
   }
   if (all || cachedInfo) {
     refreshInfo();
   }
 }
コード例 #2
0
ファイル: Partition.java プロジェクト: haught/openafs
 /**
  * Returns the total used space on this partition. After this method is called once, it saves the
  * total used space and returns that value on subsequent calls, until the {@link #refresh()}
  * method is called and a more current value is obtained.
  *
  * @exception AFSException If an error occurs in the native code
  * @return the total used space on this partition
  * @see #refresh()
  */
 public int getUsedSpace() throws AFSException {
   if (!cachedInfo) refreshInfo();
   return (totalSpace - totalFreeSpace);
 }
コード例 #3
0
ファイル: Partition.java プロジェクト: haught/openafs
 /**
  * Returns the total free space on this partition. After this method is called once, it saves the
  * total free space and returns that value on subsequent calls, until the {@link #refresh()}
  * method is called and a more current value is obtained.
  *
  * @exception AFSException If an error occurs in the native code
  * @return the total free space on this partition
  * @see #refresh()
  */
 public int getTotalFreeSpace() throws AFSException {
   if (!cachedInfo) refreshInfo();
   return totalFreeSpace;
 }
コード例 #4
0
ファイル: Partition.java プロジェクト: haught/openafs
 /**
  * Returns the lock file descriptor of this partition
  *
  * @exception AFSException If an error occurs in the native code
  * @return the lock file descriptor of this partition
  * @see #refresh()
  */
 public int getLockFileDescriptor() throws AFSException {
   if (!cachedInfo) refreshInfo();
   return lockFileDescriptor;
 }
コード例 #5
0
ファイル: Partition.java プロジェクト: haught/openafs
 /**
  * Returns the device name of this partition (i.e. "hda5", etc.)
  *
  * @exception AFSException If an error occurs in the native code
  * @return the device name of this partition
  * @see #refresh()
  */
 public String getDeviceName() throws AFSException {
   if (!cachedInfo) refreshInfo();
   return deviceName;
 }