Java API

later for retrieving objects. External storage can be accomplished using an identifier's string representation by invoking the toString method. An instance of ObjectIdentifier can be reconstituted using the constructor that takes String as an argument.

QueryResultSet

Instances of QueryResultSet provide access to the objects and metadata matching a query. The query results can be stepped through using the next method. The individual results are identifiers representing objects that match the query.

If selectKeys was specified in the original query, these metadata fields can be accessed using the typed getter methods with each field’s name.

SystemRecord

Instances of SystemRecord represent the system metadata for an object, including OID, object size, SHA1 hash, and creation time. They are returned by storeObject and storeMetadata.

NameValueRecord

Instances of NameValueRecord represent metadata used by the 5800 system to store and index user-extensible lists of name-value pairs. For convenience, instances of NameValueRecord also contain references to the SystemRecord instances of the objects they represent.

NameValueObjectArchive Application Access

Most applications make use of the NameValueObjectArchive class. This class ensures that a default metadata entry is created for every data object stored, even if no metadata is explicitly provided at store time.

The NameValueObjectArchive object functions as a proxy for the 5800 system server. All access is enabled by invoking methods on this object.

The following key methods and classes are used with the NameValueObjectArchive class:

“NameValueObjectArchive” on page 31

“delete” on page 31

“storeObject” on page 31

“storeMetadata” on page 32

“checkIndexed” on page 32

“retrieveObject” on page 33

“retrieveMetadata” on page 33

“getSchema” on page 33

“query” on page 34

“query (with selectKeys)” on page 34

30

Sun StorageTek 5800 System Client API Reference Manual • June 2008

Page 30
Image 30
Sun Microsystems 5800 manual NameValueObjectArchive Application Access, QueryResultSet