// create anonymous objects with initialized contents VASResult shore_vas::mkAnonymous( const lrid_t &pool, // oid of pool object const lrid_t &typeobj,// object's type const vec_t &core, // data for core const vec_t &heap, // data for heap ObjectOffset tstart, // where text starts int nindexes, // # indexes lrid_t *resultref, void *physid=0 ); VASResult shore_vas::mkAnonymous( const lrid_t &pool, // oid of pool object const lrid_t &typeobj,// object's type const vec_t &core, // data for core const vec_t &heap, // data for heap ObjectOffset tstart, // where text starts int nindexes, // # indexes const lrid_t ref // preallocated serial# ); // create anonymous objects with uninitialized contents VASResult shore_vas::mkAnonymous( const lrid_t &pool, // oid of pool object const lrid_t &typeobj,// object's type ObjectSize csize, // size of core ObjectSize hsize, // size of heap ObjectOffset tstart, // where text starts int nindexes, // # indexes lrid_t *resultref ); VASResult shore_vas::mkAnonymous( const lrid_t &pool, // oid of pool object const lrid_t &typeobj,// object's type ObjectSize csize, // sizeo of core ObjectSize hsize, // sizeo of heap ObjectOffset tstart, // where text starts int nindexes, // # indexes const lrid_t ref // preallocated serial# ); VASResult shore_vas::rmAnonymous( const lrid_t &obj );
These methods cannot be used to create indexes.
The argument typeobj must refer to a type in a frozen module.
The first and second forms of the method mkAnonymous create objects with initialized data; the third and fourth forms create objects with uninitialized data. When initialized data are given (arguments core and vec ), the vectors may be of any size; they may also be empty. Once an object is created, its core size cannot change.
The first and third forms of the method mkAnonymous create objects without requiring a pre-allocated serial number. When these methods are used, the server allocates and returns a serial number. The argument resultref is used both for passing information in and out of the methods. On input, the value of *resultref is inspected; if its serial number is null (in the sense that
-- see oid(shore) ), the Shore Value-Added Server allocates a new identifier for the object to be created. If the serial number is not null, the value *resultref is considered to be a pre-allocated, unused object identifier, and it is given to the object to be created. In both cases, the logical object identifier for the object created is returned in *resultref.(*resultref) == serial_t::null
The second and fourth forms of the method mkAnonymous create objects with a pre-allocated serial number, ref.
Tstart specifies the first byte (from the beginning of the object) of the TEXT attribute. If the object has no TEXT attribute, the value of tstart must be NoText. (This is not checked by the Value-Added Server. It is the responsibility of the caller to see that this is the case.)
The argument nindexes is the number of manual indexes that the object will have when the type system has finished creating the object. The SVAS keeps track of the indexes so that it can destroy them when the object is destroyed. This value cannot be changed after the object is created.
In the first form of mkAnonymous, the argument physid is optional, and if present, it points to a place in the caller's addresss space into which the SVAS will place the physical object identifier of the object that was created. This is for use by other Value-Added Servers that store physical object identifiers for performance reasons, and it is implemented only in the server libary; client processes may not use this feature.
The SVAS does require that the object identifier given be on the same volume as the pool in which the object is to be created. If it is not, method returns in failure, with the error status ST_VolumesDontMatch.
Deadlocks can occur while locks are being acquired. See transaction(svas) for information about deadlocks.
A complete list of errors is in errors(svas).