Example #1
0
 /**
  * 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();
   }
 }
Example #2
0
 /**
  * Retrieves an array containing all of the names of volumes associated with this <code>Partition
  * </code>. After this method is called once, it saves the array of <code>String</code>s and
  * returns that saved array on subsequent calls, until the {@link #refresh()} method is called and
  * a more current list is obtained.
  *
  * @return a <code>String</code> array of the volumes of the partition.
  * @exception AFSException If an error occurs in the native code
  * @see #refresh()
  */
 public String[] getVolumeNames() throws AFSException {
   if (volumeNames == null) refreshVolumeNames();
   return (String[]) volumeNames.toArray(new String[volumeNames.size()]);
 }