Home > Class Reference > ENSLIB namespace > %Archive.Session
Private  Storage   


class %Archive.Session extends %RegisteredObject

API for data archiving

Sample script that initiates a connection to an archive server

	   Set SessionOref = ##class(%Archive.Session).%New() 
	   Set SessionOref.Host = // 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. %Archive.Content):
	   // 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 Cache 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) 


Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 6 6


ApplicationName ApplicationVersion AuthFile Host
Password UserName

%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
AccessContent Connect DeleteContent Disconnect
Retrieve Store


• parameter TYPE = "Centera";
Type of the archive system (EMC Centera)
• parameter VERSION = "0.1";
Version of the API


• property ApplicationName as %String;
Name of the application, default to something like "Cache for Windows (x86-32)" (from $zv)
• property ApplicationVersion as %String;
Version of the application, default to something like "2008.2 (Build 366U)" (from $zv)
• property AuthFile as %String;
The path of a Pool Entry Authorization file (*.pea)
• property Host as %String;
Connection information, a comma-delimited list of IP addresses
For example, ","
• property Password as %String;
• property UserName as %String;
An alternative to a PEA file is a pair of UserName and Password


• method AccessContent(ContentUID As %String) as %Status
Test the existence of a content (C-Clip) by its UID (ContentAddress)
• method Connect() as %Status
Connect to the server
• method DeleteContent(ContentUID As %String) as %Status
Delete a content (C-Clip) by its UID (ContentAddress)
• method Disconnect() as %Status
Disconnect from the server
• method Retrieve(ContentOref As %Archive.Content, ContentUID As %String) as %Status
Retrieve an entire content from server
• method Store(ContentOref As %Archive.Content, ByRef ContentUID As %String) as %Status
Store an entire content to server, commit and return a UID by reference