API for data archiving. More...
Public Member Functions | |
_.Library.Status | OnClose () |
Unload DLL. | |
_.Library.Status | OnNew () |
Load DLL. | |
_.Library.Status | AccessContent (_.Library.String ContentUID) |
Test the existence of a content (C-Clip) by its UID (ContentAddress) | |
_.Library.Status | Connect () |
Connect to the server. | |
_.Library.Status | DeleteContent (_.Library.String ContentUID) |
Delete a content (C-Clip) by its UID (ContentAddress) | |
_.Library.Status | Disconnect () |
Disconnect from the server. | |
_.Library.Status | Retrieve (_.Archive.Content ContentOref, _.Library.String ContentUID) |
Retrieve an entire content from server. | |
_.Library.Status | Store (_.Archive.Content ContentOref, _.Library.String ContentUID) |
Store an entire content to server, commit and return a UID by reference. | |
![]() | |
_.Library.Status | OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount) |
This callback method is invoked when the current object is added to the SaveSet,. More... | |
_.Library.Status | OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned) |
This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More... | |
_.Library.Status | OnValidateObject () |
This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More... | |
Public Attributes | |
ApplicationName | |
Name of the application, default to something like "Cache for Windows (x86-32)" (from $zv) More... | |
ApplicationVersion | |
Version of the application, default to something like "2008.2 (Build 366U)" (from $zv) More... | |
AuthFile | |
The path of a Pool Entry Authorization file (*.pea) More... | |
Host | |
Connection information, a comma-delimited list of IP addresses More... | |
Password | |
More... | |
UserName | |
An alternative to a PEA file is a pair of UserName and Password. More... | |
Static Public Attributes | |
TYPE = None | |
Type of the archive system (EMC Centera) | |
VERSION = None | |
Version of the API. | |
![]() | |
CAPTION = None | |
Optional name used by the Form Wizard for a class when generating forms. More... | |
JAVATYPE = None | |
The Java type to be used when exported. | |
PROPERTYVALIDATION = None | |
This parameter controls the default validation behavior for the object. More... | |
Private Member Functions | |
_.Library.String | __GetAuthorization () |
Create a string based on AuthFile or UserName and Password. More... | |
_.Library.Status | __ReadFile (_.Library.String Path) |
Read the blob associated with the tag by the name 'TagName' to the file given by 'Path'. More... | |
_.Library.Status | __ReadStream (_.Library.Stream StreamOref, _.Library.String TagName) |
Similar to ReadFile, except that the data sink is a Stream object. More... | |
_.Library.Status | __Write (_.Library.String DataSource, _.Library.String TagName) |
A name for the data is required and cannot be NULL. | |
_.Library.Status | __WriteFile (_.Library.String Path) |
Create a tag with a 'TagName' and stream the given file to the blob associated with the tag. More... | |
_.Library.Status | __WriteStream (_.Library.Stream StreamOref, _.Library.String TagName) |
Similar to WriteFile, except that the data source is a Stream object. More... | |
Private Attributes | |
__BufferSizeInKB | |
The size of an internal C-Clip buffer in bytes. More... | |
__EmbeddedDataThreshold | |
The maximum data size, in bytes, for data to be embedded in the CDF instead of being stored as separate blobs. More... | |
__PrefetchSizeInKB | |
The size of the prefetch buffer. More... | |
API for data archiving.
Sample script that initiates a connection to an archive server
Set SessionOref = ##class(Archive.Session).New() Set SessionOref.Host = 123.45.6.78 // IP address of the archive server Set SessionOref.AuthFile = AuthFilePath // path of the .pea file (for Centera) Set Status = SessionOref.Connect()
Once connected, here is a sample script that stores a content (cf. <class>Archive.Content</class>):
// create a content object as source, whose handle is ContentOref (see Archive.Content) Set Status = SessionOref.Store(ContentOref, .ContentUID)
After Store() returns successfully, you need to save the ContentUID value somewhere (say, in a database) for future retrieval purpose.
Here is a sample script to retrieve the file from the archive server, using the ContentUID and open connection above:
// create a content object as target, whose handle is ContentOref (see Archive.Content) Set Status = SessionOref.Retrieve(ContentOref, ContentUID)
Limitations:
|
private |
Create a string based on AuthFile or UserName and Password.
The string will be part of the connection argument for opening the pool.
|
private |
Read the blob associated with the tag by the name 'TagName' to the file given by 'Path'.
If TagName is not specified, use the current tag (either the first tag or the tag pointed to by GetNextTag()) If TagName is not unique in the content, use the first matching tag. May generate <READ> error
|
private |
Similar to ReadFile, except that the data sink is a Stream object.
NOT IMPLEMENTED.
|
private |
Create a tag with a 'TagName' and stream the given file to the blob associated with the tag.
Acceptable characters for a TagName are ASCII characters in the Set [a-zA-Z0-9_-.]. [No restriction in Unicode version] The first character must be a letter or an underscore "_". The name must be XML compliant and cannot start with the prefix "xml" or "eclip". May generate <WRITE> error
|
private |
Similar to WriteFile, except that the data source is a Stream object.
NOT IMPLEMENTED.
ApplicationName |
Name of the application, default to something like "Cache for Windows (x86-32)" (from $zv)
ApplicationVersion |
Version of the application, default to something like "2008.2 (Build 366U)" (from $zv)
AuthFile |
The path of a Pool Entry Authorization file (*.pea)
|
private |
The size of an internal C-Clip buffer in bytes.
This value must be greater than 0.
The SDK default value is 16KB. The default value we use here is 64KB.
|
private |
The maximum data size, in bytes, for data to be embedded in the CDF instead of being stored as separate blobs.
The SDK default value is 0 bytes, meaning data is never embedded in the CDF. The maximum value is 102400 bytes (100 KB), which is the default value we use here. The value for the embedded data threshold can be set to less than or equal to 102400 bytes.
Host |
Connection information, a comma-delimited list of IP addresses
For example, "10.2.3.4,10.6.7.8"
Password |
|
private |
The size of the prefetch buffer.
This buffer is used to assist in determining the size of the blob.
The SDK default size is 32 KB. The maximum size is 1 MB, which is the default value we use here.
UserName |
An alternative to a PEA file is a pair of UserName and Password.