%Archive.Session
class %Archive.Session extends %Library.RegisteredObject
API for data archivingSample 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()
// create a content object as source, whose handle is ContentOref (see %Archive.Content) Set Status = SessionOref.Store(ContentOref, .ContentUID)
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)
- Only EMC Centera server is supported as an archive server
- The source of storing and the target of retrieval must be files
- Only one open connection per Cache process. Attempt to open additional connections (whether to the same server as the existing connection or not) would get an error.
- Retrieving selected files from a content containing multiple files ("blobs") is not supported.
Property Inventory
Method Inventory
Parameters
parameter TYPE = Centera;
Type of the archive system (EMC Centera)
parameter VERSION = 0.1;
Version of the API
Properties
property ApplicationName as %String;
Name of the application, default to something like "Cache for Windows (x86-32)" (from $zv)
Property methods: ApplicationNameDisplayToLogical(), ApplicationNameGet(), ApplicationNameIsValid(), ApplicationNameLogicalToDisplay(), ApplicationNameLogicalToOdbc(), ApplicationNameNormalize(), ApplicationNameSet()
property ApplicationVersion as %String;
Version of the application, default to something like "2008.2 (Build 366U)" (from $zv)
Property methods: ApplicationVersionDisplayToLogical(), ApplicationVersionGet(), ApplicationVersionIsValid(), ApplicationVersionLogicalToDisplay(), ApplicationVersionLogicalToOdbc(), ApplicationVersionNormalize(), ApplicationVersionSet()
property AuthFile as %String;
The path of a Pool Entry Authorization file (*.pea)
Property methods: AuthFileDisplayToLogical(), AuthFileGet(), AuthFileIsValid(), AuthFileLogicalToDisplay(), AuthFileLogicalToOdbc(), AuthFileNormalize(), AuthFileSet()
property Host as %String;
Connection information, a comma-delimited list of IP addresses
For example, "10.2.3.4,10.6.7.8"
For example, "10.2.3.4,10.6.7.8"
Property methods: HostDisplayToLogical(), HostGet(), HostIsValid(), HostLogicalToDisplay(), HostLogicalToOdbc(), HostNormalize(), HostSet()
property Password as %String;
Property methods: PasswordDisplayToLogical(), PasswordGet(), PasswordIsValid(), PasswordLogicalToDisplay(), PasswordLogicalToOdbc(), PasswordNormalize(), PasswordSet()
property UserName as %String;
An alternative to a PEA file is a pair of UserName and Password
Property methods: UserNameDisplayToLogical(), UserNameGet(), UserNameIsValid(), UserNameLogicalToDisplay(), UserNameLogicalToOdbc(), UserNameNormalize(), UserNameSet()
Methods
Test the existence of a content (C-Clip) by its UID (ContentAddress)
method Connect() as %Status
Connect to the server
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
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()