Function
Name:
CreateVolume_MT
Class: ISPack .CPISVolumeTxn
Description: This function can be used to create a Volume, which is a
logical unit to manage the data. This function returns the Volume Index in one
of its input parameter, which can be used later to add, retrieve documents, or
to associate a Volume with any Folder.
Prototype:
public synchronized static void
CreateVolume_MT |
|
|
|
( |
|
|
|
JtsConnection jtsCon, |
|
|
String jtsAddress, |
|
|
short portId, |
|
|
String cabinetName, |
|
|
short homeSite, |
|
|
String volumeName, |
|
|
short volBlockSize, |
|
|
String volBlockPath, |
|
|
char repType, |
|
|
JPDBShort newVolumeId |
|
) |
|
throws JPISException |
|
|
|
|
|
Name |
Description |
Valid Values |
Default Behaviour |
jtsCon |
This object holds a
connection to the JTS. However, it can be sent as null, as a new socket
connection to JTS using second two parameters (jtsAddress and portId) is
created inside the function when the parameter is sent as null. |
Jts connection
Object. |
null |
jtsAddress |
IP Address or Name
of the Machine on which, JTS is running. |
IP Address or
Machine Name. |
N/A |
portId |
Port Number on
which the JTS is running. |
short > 0 |
N/A |
cabinetName |
Name of the
Database Cabinet to which the User wants to connect. |
Image Server
Cabinet Name. |
N/A |
homeSite |
This parameter is
reserved and can be used if the System is deployed in any other model. |
1 |
N/A |
volumeName |
Name of the Volume. |
Any string. (Valid) |
null |
volBlockSize |
Size of one Volume
Block (in Mega Bytes). |
Integer >= 0 |
N/A |
volBlockPath |
Label Name in which
the Volume Blocks are to be stored. |
Label names. |
null |
repType |
Specifies whether
Replication of Volume Blocks is to be done now or later. |
L Later A - Now |
N/A |
newVolumeId |
This is an Object
of the class JPDBShort. This is an output parameter. The Index of the newly
created Volume is returned through this Object. JPDBShort belongs to
Jdts.DataObject Package. |
Object of
JPDBShort. |
N/A |
This Function does
not return any value explicitly. However the new Volume is returned via
newVolumeId input parameter.
Example Usage
import ISPack.*;
import Jdts.DataObject.*;
.
JPDBShort jpdbShort = new
JPDBShort();
try
{
CPISVolumeTxn.CreateVolume_MT(null,
202.91.23.44, (short)9000, sampleCabinet , (short)1, "" , (short)20 , null , 'L', jpdbShort);
}
catch
(ISPack.ISUtil.JPISException ex) {}
After this function
is executed, jpdbShort contains the Volume Id of the newly created Volume.
This Id is retrieved
via public member variable value in the class JPDBShort.
short volumeID =
jpdbShort. value;