|
JAFS API v2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openafs.jafs.Volume
An abstract representation of an AFS volume. It holds information about
the server, such as what its quota is.
Constructing an instance of a Volume
does not mean an actual
AFS partition is created on a partition -- usually a Volume
object is a representation of an already existing AFS volume. If,
however, the Volume
is constructed with the name of a
volume that does not exist in the cell to which the provided
Partition
belongs, a new AFS volume with that name can be
created on that partition by calling the create(int)
method. If
such a volume does already exist when this method is called, an exception
will be thrown.
The following is a simple example of how to construct and use a
Volume
object. This example obtains the list of
Volume
objects residing on a particular partition, and prints
out the name and id of each one.
import org.openafs.jafs.Cell; import org.openafs.jafs.AFSException; import org.openafs.jafs.Partition; import org.openafs.jafs.Server; import org.openafs.jafs.Volume; ... public class ... { ... private Cell cell; private Server server; private Partition partition; ... public static void main(String[] args) throws Exception { String username = arg[0]; String password = arg[1]; String cellName = arg[2]; String serverName = arg[3]; String partitionName = arg[4]; token = new Token(username, password, cellName); cell = new Cell(token); server = cell.getServer(serverName); partition = cell.getPartition(partitionName); System.out.println("Volumes in Partition " + partition.getName() + ":"); Volume[] volumes = partition.getVolumes(); for (int i = 0; i < volumes.length; i++) { System.out.println(" -> " + volumes[i] + ": " + volumes[i].getID()); } } ... }
Field Summary | |
protected int |
accessesSinceMidnight
|
protected int |
backupID
|
protected boolean |
cachedInfo
|
protected Cell |
cell
|
protected long |
copyCreationDate
|
protected GregorianCalendar |
copyCreationDateCal
|
protected long |
creationDate
|
protected GregorianCalendar |
creationDateCal
|
protected int |
currentSize
|
protected int |
disposition
|
protected int |
fileCount
|
protected int |
id
|
protected long |
lastAccessDate
|
protected long |
lastBackupDate
|
protected long |
lastUpdateDate
|
protected GregorianCalendar |
lastUpdateDateCal
|
protected int |
maxQuota
|
protected String |
name
|
protected Partition |
partition
|
protected int |
readOnlyID
|
protected int |
readWriteID
|
protected Server |
server
|
protected int |
status
|
protected int |
type
|
static int |
VOLUME_BUSY
Status/disposition busy |
static int |
VOLUME_DISK_FULL
Status/disposition disk full |
static int |
VOLUME_MOVED
Status/disposition moved |
static int |
VOLUME_NO_SERVICE
Status/disposition no service |
static int |
VOLUME_NO_VNODE
Status/disposition no vnode |
static int |
VOLUME_NO_VOL
Status/disposition no volume |
static int |
VOLUME_OFFLINE
Status/disposition offline |
static int |
VOLUME_OK
Status/disposition ok |
static int |
VOLUME_ONLINE
Status/disposition online |
static int |
VOLUME_OVER_QUOTA
Status/disposition over quota |
static int |
VOLUME_SALVAGE
Status/disposition salvage |
static int |
VOLUME_TYPE_BACKUP
Backup volume type |
static int |
VOLUME_TYPE_READ_ONLY
Read-only volume type |
static int |
VOLUME_TYPE_READ_WRITE
Read-write volume type |
static int |
VOLUME_VOL_EXISTS
Status/disposition volume exists |
Constructor Summary | |
(package private) |
Volume(Partition partition)
Creates a blank Volume given the cell to which the volume
belongs, the server on which the partition resides, and
the partition on which the volume resides. |
|
Volume(String name,
Partition partition)
Constructs a new Volume object instance given the name of
the AFS volume and the AFS cell, represented by partition ,
to which it belongs. |
|
Volume(String name,
Partition partition,
boolean preloadAllMembers)
Constructs a new Volume object instance given the name of
the AFS volume and the AFS partition, represented by
partition , to which it belongs. |
Method Summary | |
protected static void |
changeQuota(int cellHandle,
int serverHandle,
int partition,
int volId,
int newQuota)
Changes the quota of the specified volume. |
int |
compareTo(Object obj)
Comparable interface method. |
int |
compareTo(Volume volume)
Compares two Volume objects respective to their names and does not factor any other attribute. |
void |
create(int quota)
Creates a new volume on the server and partition given upon construction. |
protected static int |
create(int cellHandle,
int serverHandle,
int partition,
String volumeName,
int quota)
Creates a volume on a particular partition. |
Volume |
createBackup()
Creates a backup volume for this volume. |
protected static void |
createBackupVolume(int cellHandle,
int volId)
Creates a backup volume for the specified regular volume. |
void |
createMountPoint(String directory)
Creates a read-write mount point for this volume. |
void |
createMountPoint(String directory,
boolean readWrite)
Creates a mount point for this volume. |
Volume |
createReadOnly(Partition sitePartition)
Creates a readonly site for this volume on the specified server and partition. |
protected static void |
createReadOnlyVolume(int cellHandle,
int serverHandle,
int partition,
int volId)
Creates a read-only volume for the specified regular volume. |
void |
delete()
Deletes the volume from the cell. |
protected static void |
delete(int cellHandle,
int serverHandle,
int partition,
int volId)
Deletes a volume from a particular partition. |
protected static void |
deleteReadOnlyVolume(int cellHandle,
int serverHandle,
int partition,
int volId)
Deletes a read-only volume for the specified regular volume. |
protected static void |
dump(int cellHandle,
int serverHandle,
int partition,
int volId,
int startTime,
String dumpFile)
Dumps the specified volume to a file. |
void |
dump(String fileName)
Dumps this volume to a file. |
void |
dump(String fileName,
GregorianCalendar dumpSince)
Dumps this volume to a file. |
boolean |
equals(Volume otherVolume)
Tests whether two Volume objects are equal, based on their
names and hosting partition. |
int |
getAccessesSinceMidnight()
Returns the number of accesses since midnight. |
int |
getBackupID()
Returns the backup ID of this volume |
GregorianCalendar |
getCopyCreationDate()
Returns the date the volume was copied. |
GregorianCalendar |
getCreationDate()
Returns the date the volume was created |
int |
getCurrentSize()
Returns current volume size in K. |
int |
getDisposition()
Returns volume disposition. |
int |
getFileCount()
Returns file count. |
int |
getID()
Returns the id of this volume. |
protected String |
getInfo()
Returns a String representation of this Volume .
|
GregorianCalendar |
getLastUpdateDate()
Returns the date the volume was last updated. |
String |
getName()
Returns the name of this volume. |
Partition |
getPartition()
Returns this volume's hosting partition. |
int |
getQuota()
Returns this volume's quota, expressed in kilobyte blocks (1024 kilobyte blocks equal one megabyte). |
int |
getReadOnlyID()
Returns the read-only ID of this volume |
int |
getReadWriteID()
Returns the read-write ID of this volume |
int |
getStatus()
Returns volume status. |
int |
getTotalFreeSpace()
Returns the difference between quota and current volume size (in K). |
int |
getType()
Returns volume type. |
protected static void |
getVolumeInfo(int cellHandle,
int serverHandle,
int partition,
int volId,
Volume theVolume)
Fills in the information fields of the provided Volume . |
boolean |
isQuotaUnlimited()
Tests whether this volume's quota is configured as unlimited. |
void |
lock()
Locks the VLDB enrty for this volume |
protected static void |
lock(int cellHandle,
int volId)
Locks the VLDB entry specified volume |
void |
mount()
Mounts this volume, bringing it online and making it accessible. |
protected static void |
mount(int serverHandle,
int partition,
int volId,
int sleepTime,
boolean offline)
"Mounts" the specified volume, bringing it online. |
protected static void |
move(int cellHandle,
int fromServerHandle,
int fromPartition,
int toServerHandle,
int toPartition,
int volId)
Move the specified volume to a different site. |
void |
moveTo(Partition newPartition)
Moves this volume to the specified partition (which indirectly specifies a new server, as well). |
protected static void |
reclaimVolumeMemory()
Reclaims all memory being saved by the volume portion of the native library. |
void |
refresh()
Refreshes the properties of this Volume object instance with values from the AFS volume it represents. |
protected void |
refresh(boolean all)
Refreshes the properties of this Volume object instance with values from the AFS volume it represents. |
protected void |
refreshInfo()
Refreshes the information fields of this Volume to reflect
the current state of the AFS volume. |
void |
release()
Releases this volume, which updates the read-only copies of it. |
void |
release(boolean forceComplete)
Releases this volume, which updates the read-only copies of it. |
protected static void |
release(int cellHandle,
int volId,
boolean forceComplete)
Releases the specified volume that has readonly volume sites. |
protected static void |
rename(int cellHandle,
int volId,
String newVolumeName)
Renames the specified read-write volume. |
void |
rename(String newName)
Renames this volume. |
protected static void |
restore(int cellHandle,
int serverHandle,
int partition,
int volId,
String volumeName,
String dumpFile,
boolean incremental)
Restores the specified volume from a dump file. |
void |
restore(String fileName,
boolean incremental)
Restores a file to this volume. |
void |
restore(String fileName,
boolean incremental,
int id)
Restores a file to this volume. |
void |
salvage()
Salvages (restores consistency to) this volume. |
void |
setQuota(int quota)
Sets quota of volume, 0 denotes an unlimited quota. |
String |
toString()
Returns the name of this Volume |
protected static int |
translateNameToID(int cellHandle,
String name,
int volumeType)
Translates a volume name into a volume id |
void |
unlock()
Unlocks the VLDB entry for this volume |
protected static void |
unlock(int cellHandle,
int volId)
Unlocks the VLDB entry of the specified volume |
void |
unmount()
Unmounts this volume, bringing it offline and making it inaccessible. |
protected static void |
unmount(int serverHandle,
int partition,
int volId)
"Unmounts" the specified volume, bringing it offline. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int VOLUME_TYPE_READ_WRITE
public static final int VOLUME_TYPE_READ_ONLY
public static final int VOLUME_TYPE_BACKUP
public static final int VOLUME_OK
public static final int VOLUME_SALVAGE
public static final int VOLUME_NO_VNODE
public static final int VOLUME_NO_VOL
public static final int VOLUME_VOL_EXISTS
public static final int VOLUME_NO_SERVICE
public static final int VOLUME_OFFLINE
public static final int VOLUME_ONLINE
public static final int VOLUME_DISK_FULL
public static final int VOLUME_OVER_QUOTA
public static final int VOLUME_BUSY
public static final int VOLUME_MOVED
protected Cell cell
protected Server server
protected Partition partition
protected String name
protected int id
protected int readWriteID
protected int readOnlyID
protected int backupID
protected long creationDate
protected long lastAccessDate
protected long lastUpdateDate
protected long lastBackupDate
protected long copyCreationDate
protected int accessesSinceMidnight
protected int fileCount
protected int maxQuota
protected int currentSize
protected int status
protected int disposition
protected int type
protected GregorianCalendar creationDateCal
protected GregorianCalendar lastUpdateDateCal
protected GregorianCalendar copyCreationDateCal
protected boolean cachedInfo
Constructor Detail |
public Volume(String name, Partition partition) throws AFSException
Volume
object instance given the name of
the AFS volume and the AFS cell, represented by partition
,
to which it belongs. This does not actually
create a new AFS volume, it just represents one.
If name
is not an actual AFS volume, exceptions
will be thrown during subsequent method invocations on this
object, unless the create(int)
method is explicitly called
to create it.
name
- the name of the volume to representpartition
- the partition on which the volume resides
AFSException
- If an error occurs in the native codepublic Volume(String name, Partition partition, boolean preloadAllMembers) throws AFSException
Volume
object instance given the name of
the AFS volume and the AFS partition, represented by
partition
, to which it belongs. This does not actually
create a new AFS volume, it just represents one.
If name
is not an actual AFS volume, exceptions
will be thrown during subsequent method invocations on this
object, unless the create(int)
method is explicitly called
to create it. Note that if the volume doesn't exist and
preloadAllMembers
is true, an exception will be thrown.
This constructor is ideal for point-in-time representation and
transient applications. It ensures all data member values are set
and available without calling back to the filesystem at the first request
for them. Use the refresh()
method to address any coherency
concerns.
name
- the name of the volume to representpartition
- the partition on which the volume resides.preloadAllMembers
- true will ensure all object members are set
upon construction; otherwise members will be
set upon access, which is the default behavior.
AFSException
- If an error occurs in the native coderefresh()
Volume(Partition partition) throws AFSException
Volume
given the cell to which the volume
belongs, the server on which the partition resides, and
the partition on which the volume resides. This blank
object can then be passed into other methods to fill out its properties.
partition
- the partition on which the volume resides
AFSException
- If an error occurs in the native codeMethod Detail |
public void refresh() throws AFSException
Since in most environments administrative changes can be administered from an AFS command-line program or an alternate GUI application, this method provides a means to refresh the Java object representation and thereby ascertain any possible modifications that may have been made from such alternate administrative programs. Using this method before an associated instance accessor will ensure the highest level of representative accuracy, accommodating changes made external to the Java application space. If administrative changes to the underlying AFS system are only allowed via this API, then the use of this method is unnecessary.
AFSException
- If an error occurs in the native codeprotected void refresh(boolean all) throws AFSException
all
is true
then all of the properties of this Volume object instance will be
set, or renewed, according to the values of the AFS volume it represents,
disregarding any previously set properties.
Thus, if all
is false
then properties that
are currently set will be refreshed and properties that are not set will
remain uninitialized. See refresh()
for more information.
all
- if true set or renew all object properties; otherwise renew
all set properties
AFSException
- If an error occurs in the native coderefresh()
protected void refreshInfo() throws AFSException
Volume
to reflect
the current state of the AFS volume. These include the last update time,
file count, etc.
AFSException
- If an error occurs in the native codepublic void create(int quota) throws AFSException
quota
- the quota for the volume in K, 0 indicates an unlimited
quota
AFSException
- If an error occurs in the native codepublic Volume createBackup() throws AFSException
Volume
object representation for the
backup volume that was created
AFSException
- If an error occurs in the native codepublic Volume createReadOnly(Partition sitePartition) throws AFSException
sitePartition
- the partition on which the readonly volume is
to reside
Volume
representation for the
read-only volume that was created
AFSException
- If an error occurs in the native codepublic void delete() throws AFSException
AFSException
- If an error occurs in the native codepublic void release() throws AFSException
This method will force a complete release; a complete release updates all read-only sites even if the VLDB entry has a flag.
AFSException
- If an error occurs in the native codepublic void release(boolean forceComplete) throws AFSException
forceComplete
- whether or not to force a complete release;
a complete release updates all read-only sites
even if the VLDB entry has a flag
AFSException
- If an error occurs in the native codepublic void dump(String fileName, GregorianCalendar dumpSince) throws AFSException
null
for a full dump.
fileName
- the path name of the file on the client machine to
which to dump this volumedumpSince
- dump only files that have been modified more recently
than this date
AFSException
- If an error occurs in the native codepublic void dump(String fileName) throws AFSException
fileName
- the path name of the file to which to dump this volume
AFSException
- If an error occurs in the native codepublic void restore(String fileName, boolean incremental) throws AFSException
Volume
as a volume that doesn't yet exist and then restore
a file to it. Or you can restore over an existing volume. If a new
volume is being created with this method, the id will be automatically
assigned.
fileName
- the path name of the file on the client machine from
which to restore this volumeincremental
- if true, restores an incremental dump over an
existing volume
AFSException
- If an error occurs in the native codepublic void restore(String fileName, boolean incremental, int id) throws AFSException
Volume
as a volume that doesn't yet exist and then restore
a file to it. Or you can restore over an existing volume.
fileName
- the path name of the file on the client machine from
which to restore this volumeincremental
- if true, restores an incremental dump over an
existing volumeid
- the id to assign this volume
AFSException
- If an error occurs in the native codepublic void mount() throws AFSException
AFSException
- If an error occurs in the native codepublic void unmount() throws AFSException
AFSException
- If an error occurs in the native codepublic void lock() throws AFSException
AFSException
- If an error occurs in the native codepublic void unlock() throws AFSException
AFSException
- If an error occurs in the native codepublic void moveTo(Partition newPartition) throws AFSException
newPartition
- the partition to which to move the volume
AFSException
- If an error occurs in the native codepublic void rename(String newName) throws AFSException
newName
- the new name for this volume
AFSException
- If an error occurs in the native codepublic void salvage() throws AFSException
AFSException
- If an error occurs in the native codepublic void createMountPoint(String directory) throws AFSException
directory
- the name of the directory where this volume
should be mounted
AFSException
- If an error occurs in the native codepublic void createMountPoint(String directory, boolean readWrite) throws AFSException
directory
- the name of the directory where this volume should be
mountedreadWrite
- whether or not this mount point should be read-write
AFSException
- If an error occurs in the native codepublic String getName()
public Partition getPartition()
public int getID() throws AFSException
AFSException
- If an error occurs in the native codepublic int getReadWriteID() throws AFSException
AFSException
- If an error occurs in the native codepublic int getReadOnlyID() throws AFSException
AFSException
- If an error occurs in the native codepublic int getBackupID() throws AFSException
AFSException
- If an error occurs in the native codepublic GregorianCalendar getCreationDate() throws AFSException
AFSException
- If an error occurs in the native codepublic GregorianCalendar getLastUpdateDate() throws AFSException
refresh()
method is called and a more current
value is obtained.
AFSException
- If an error occurs in the native codepublic GregorianCalendar getCopyCreationDate() throws AFSException
refresh()
method is called and a more current
value is obtained.
AFSException
- If an error occurs in the native codepublic int getAccessesSinceMidnight() throws AFSException
refresh()
method is called and a more current
value is obtained.
AFSException
- If an error occurs in the native codepublic int getFileCount() throws AFSException
refresh()
method is called and a more current
value is obtained.
AFSException
- If an error occurs in the native codepublic int getCurrentSize() throws AFSException
refresh()
method is called and a more current
value is obtained.
AFSException
- If an error occurs in the native codepublic int getTotalFreeSpace() throws AFSException
Please note: the product of this method is not saved.
AFSException
- If an error occurs in the native codepublic int getQuota() throws AFSException
refresh()
method is called and a more current
value is obtained.
Note: A quota value of zero, "0", grants an unlimited quota
in AFS. Consequently, to avoid delusion this method will throw an
AFSException
if the returning value is zero.
AFSException
- If an error occurs in the native code or
this volume's quota is configured as
unlimited.isQuotaUnlimited()
public boolean isQuotaUnlimited() throws AFSException
After this method is called once, it saves the value and returns
that value on subsequent calls, until the refresh()
method is called and a more current value is obtained.
true
if this volume's quota is configured as
unlimited; otherwise false
.
AFSException
- If an error occurs in the native codegetQuota()
public int getStatus() throws AFSException
VOLUME_OK
VOLUME_SALVAGE
VOLUME_NO_VNODE
VOLUME_NO_VOL
VOLUME_VOL_EXISTS
VOLUME_NO_SERVICE
VOLUME_OFFLINE
VOLUME_ONLINE
VOLUME_DISK_FULL
VOLUME_OVER_QUOTA
VOLUME_BUSY
VOLUME_MOVED
refresh()
method is called and a more current
value is obtained.
AFSException
- If an error occurs in the native codepublic int getDisposition() throws AFSException
VOLUME_OK
VOLUME_SALVAGE
VOLUME_NO_VNODE
VOLUME_NO_VOL
VOLUME_VOL_EXISTS
VOLUME_NO_SERVICE
VOLUME_OFFLINE
VOLUME_ONLINE
VOLUME_DISK_FULL
VOLUME_OVER_QUOTA
VOLUME_BUSY
VOLUME_MOVED
refresh()
method is called and a more current
value is obtained.
AFSException
- If an error occurs in the native codepublic int getType() throws AFSException
AFSException
- If an error occurs in the native codepublic void setQuota(int quota) throws AFSException
quota
- the new volume quota in K (0 for unlimited)
AFSException
- If an error occurs in the native codeprotected String getInfo()
String
representation of this Volume
.
Contains the information fields.
String
representation of the Volume
public int compareTo(Volume volume)
volume
- The Volume object to be compared to this Volume
instance
public int compareTo(Object obj)
compareTo
in interface Comparable
compareTo(Volume)
public boolean equals(Volume otherVolume)
Volume
objects are equal, based on their
names and hosting partition.
otherVolume
- the Volume to test
public String toString()
Volume
toString
in class Object
Volume
protected static void getVolumeInfo(int cellHandle, int serverHandle, int partition, int volId, Volume theVolume) throws AFSException
Volume
.
cellHandle
- the handle of the cell to which the volume belongsserverHandle
- the vos handle of the server on which the volume
residespartition
- the numeric id of the partition on which the volume
residesvolId
- the numeric id of the volume for which to get the infotheVolume
- the Volume
object in which to fill in
the information
AFSException
- If an error occurs in the native codeCell.getCellHandle()
,
Server.getVosServerHandle(int, java.lang.String)
protected static int create(int cellHandle, int serverHandle, int partition, String volumeName, int quota) throws AFSException
cellHandle
- the handle of the cell in which to create the volumeserverHandle
- the vos handle of the server on which to create
the volumepartition
- the numeric id of the partition on which to create
the volumevolumeName
- the name of the volume to createquota
- the amount of space (in KB) to set as this volume's quota
AFSException
- If an error occurs in the native codeCell.getCellHandle()
,
Server.getVosServerHandle(int, java.lang.String)
protected static void delete(int cellHandle, int serverHandle, int partition, int volId) throws AFSException
cellHandle
- the handle of the cell in which to delete the volumeserverHandle
- the vos handle of the server from which to delete
the volumepartition
- the numeric id of the partition from which to delete
the volumevolId
- the numeric id of the volume to delete
AFSException
- If an error occurs in the native codeCell.getCellHandle()
,
Server.getVosServerHandle(int, java.lang.String)
protected static void createBackupVolume(int cellHandle, int volId) throws AFSException
cellHandle
- the handle of the cell to which the volume belongsvolId
- the numeric id of the volume for which to create a backup
volume
AFSException
Cell.getCellHandle()
protected static void createReadOnlyVolume(int cellHandle, int serverHandle, int partition, int volId) throws AFSException
cellHandle
- the handle of the cell to which the volume belongsserverHandle
- the vos handle of the server on which the read-only
volume is to residepartition
- the numeric id of the partition on which the read-only
volume is to residevolId
- the numeric id of the volume for which to create a read-only volume
AFSException
Server.getVosServerHandle(int, java.lang.String)
,
Cell.getCellHandle()
protected static void deleteReadOnlyVolume(int cellHandle, int serverHandle, int partition, int volId) throws AFSException
cellHandle
- the handle of the cell to which the volume belongsserverHandle
- the vos handle of the server on which the read-only
volume resideapartition
- the numeric id of the partition on which the read-only
volume residesvolId
- the numeric read-write id of the volume for which to
delete the read-only volume
AFSException
Server.getVosServerHandle(int, java.lang.String)
,
Cell.getCellHandle()
protected static void changeQuota(int cellHandle, int serverHandle, int partition, int volId, int newQuota) throws AFSException
cellHandle
- the handle of the cell to which the volume belongsserverHandle
- the vos handle of the server on which the volume
residespartition
- the numeric id of the partition on which the volume
residesvolId
- the numeric id of the volume for which to change the quotanewQuota
- the new quota (in KB) to assign the volume
AFSException
- If an error occurs in the native codeCell.getCellHandle()
,
Server.getVosServerHandle(int, java.lang.String)
protected static void move(int cellHandle, int fromServerHandle, int fromPartition, int toServerHandle, int toPartition, int volId) throws AFSException
cellHandle
- the handle of the cell to which the volume belongsfromServerHandle
- the vos handle of the server on which the volume
currently residesfromPartition
- the numeric id of the partition on which the volume
currently residestoServerHandle
- the vos handle of the server to which the volume
should be movedtoPartition
- the numeric id of the partition to which the volume
should be movedvolId
- the numeric id of the volume to move
AFSException
- If an error occurs in the native codeCell.getCellHandle()
,
Server.getVosServerHandle(int, java.lang.String)
protected static void release(int cellHandle, int volId, boolean forceComplete) throws AFSException
cellHandle
- the handle of the cell to which the volume belongsvolId
- the numeric id of the volume to releaseforceComplete
- whether or not to force a complete release
AFSException
Cell.getCellHandle()
protected static void dump(int cellHandle, int serverHandle, int partition, int volId, int startTime, String dumpFile) throws AFSException
cellHandle
- the handle of the cell to which the volume belongsserverHandle
- the vos handle of the server on which the volume
residespartition
- the numeric id of the partition on which the
volume residesvolId
- the numeric id of the volume to dumpstartTime
- files with a modification time >= to this time will
be dumpeddumpFile
- the full path of the file to which to dump
AFSException
- If an error occurs in the native codeCell.getCellHandle()
,
Server.getVosServerHandle(int, java.lang.String)
protected static void restore(int cellHandle, int serverHandle, int partition, int volId, String volumeName, String dumpFile, boolean incremental) throws AFSException
cellHandle
- the handle of the cell to which the volume belongsserverHandle
- the vos handle of the server on which the volume is
to residepartition
- the numeric id of the partition on which the volume is
to residevolId
- the numeric id to assign the restored volume (can be 0)volumeName
- the name of the volume to restore asdumpFile
- the full path of the dump file from which to restoreincremental
- if true, restores an incremental dump over an existing
volume (server and partition values must correctly
indicate the current position of the existing volume),
otherwise restores a full dump
AFSException
- If an error occurs in the native codeCell.getCellHandle()
,
Server.getVosServerHandle(int, java.lang.String)
protected static void rename(int cellHandle, int volId, String newVolumeName) throws AFSException
cellHandle
- the handle of the cell to which the volume belongsvolId
- the numeric id of the read-write volume to renamenewVolumeName
- the new name for the volume
AFSException
- If an error occurs in the native codeCell.getCellHandle()
protected static void mount(int serverHandle, int partition, int volId, int sleepTime, boolean offline) throws AFSException
serverHandle
- the vos handle of the server on which the volume
residespartition
- the numeric id of the partition on which the volume
residesvolId
- the numeric id of the volume to bring onlinesleepTime
- ? (not sure what this is yet, possibly a time to wait
before brining it online)offline
- ? (not sure what this is either, probably the current
status of the volume -- busy or offline)
AFSException
- If an error occurs in the native codeServer.getVosServerHandle(int, java.lang.String)
protected static void unmount(int serverHandle, int partition, int volId) throws AFSException
serverHandle
- the vos handle of the server on which the volume
residespartition
- the numeric id of the partition on which the volume
residesvolId
- the numeric id of the volume to bring offline
AFSException
- If an error occurs in the native codeServer.getVosServerHandle(int, java.lang.String)
protected static void lock(int cellHandle, int volId) throws AFSException
cellHandle
- the handle of the cell on which the volume residesvolId
- the numeric id of the volume to lock
AFSException
- If an error occurs in the native codeCell.getCellHandle()
protected static void unlock(int cellHandle, int volId) throws AFSException
cellHandle
- the handle of the cell on which the volume residesvolId
- the numeric id of the volume to unlock
AFSException
- If an error occurs in the native codeCell.getCellHandle()
protected static int translateNameToID(int cellHandle, String name, int volumeType) throws AFSException
cellHandle
- the handle of the cell to which the volume belongsname
- the name of the volume in question, cannot end in backup or
readonly
AFSException
- If an error occurs in the native codeCell.getCellHandle()
protected static void reclaimVolumeMemory()
Volume
objects are expected to be used.
|
JAFS API v2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |