Oberon || Library || Module Index || Search Engine || Definition || Module


Ulm's Oberon Library:
PersistentNodes


NAME

PersistentNodes - persistent hierarchy of nodes

SYNOPSIS

CONST dbfailure = 0;
CONST dbinconsistent = 1;
CONST transfailure = 2;
CONST noroot = 3;
CONST linkwithoutparent = 4;
CONST nonunique = 5;
CONST badlink = 6;
CONST errors = 7;
TYPE ErrorCode = SHORTINT; (* dbfailure ... *)
TYPE ErrorEvent = POINTER TO ErrorEventRec;
TYPE ErrorEventRec =
      RECORD
         (Events.EventRec)
         errorcode: ErrorCode;
      END;
VAR errormsg: ARRAY errors OF Events.Message;
VAR error: Events.EventType;


PROCEDURE Init(container: Containers.Container; permissions: Names.Permissions) : BOOLEAN;

PROCEDURE Open(VAR root: Names.Node; container: Containers.Container) : BOOLEAN;

DESCRIPTION

PersistentNodes provides an implementation of Names where the nodes remain persistent thanks to a persistent container. All capabilities of Names are supported. Some notes regarding this implementation:

Init prepares a container for subsequent use of this module. This causes all present objects in the container to be deleted and an empty root node to be inserted with the given set of access permissions.

Open opens container and, if successful, makes its root node available. Some notes:

DIAGNOSTICS

PersistentNodes generates various standard error events of Names and following in addition:
dbfailure
an operation on the underlying container failed.
dbinconsistent
inconsistencies were found by Open within the container
transfailure
the transaction object of ObjectTransactions which is used for the container generated an error
noroot
no root object was found within the container (special case of a database inconsistency)
linkwithoutparent
a link without a valid parent node was found within the container (special case of a database inconsistency)
nonunique
two links shared the same name and belonged to the same parent node (special case of a database inconsistency)
badlink
a link with an invalid reference was found within the container (special case of a database inconsistency)

SEE ALSO

Containers
abstraction for persistent object databases
Names
Oberon name spaces
Shards
general abstraction for authorizations

Edited by: borchert, last change: 2004/06/25, revision: 1.2, converted to HTML: 2004/06/25

Oberon || Library || Module Index || Search Engine || Definition || Module