You can improve application performance by clustering together objects that are expected to be used together by applications. This reduces the number of disk and network transfers the applications will require. Moreover, allocating objects in different clusters can increase concurrency, since one process's lock on an object in one cluster never blocks access by other processes to objects in other clusters (assuming os_segment::lock_whole_segment has value objectstore::lock_as_used - the default - for the segments containing the clusters).
The types os_int32 and os_boolean, used throughout this manual, are each defined as a signed 32-bit integer type. The type os_unsigned_int32 is defined as an unsigned 32-bit integer type.
os_object_cluster::destroy()
void destroy( forced_destroy_enum option = os_object_cluster::destroy_if_empty );Destroys the specified os_object_cluster if either the cluster contains no nondeleted objects or the os_int32 argument is the enumerator os_object_cluster::destroy_always. If invoked on a nonempty cluster with os_object_cluster::destroy_if_empty as argument, the exception err_destroy_cluster_not_empty is signaled.
void get_info( os_int32 &cluster_size, os_int32 &free, os_int32 &contig_free ) const;Modifies cluster_size to refer to the size in bytes of the specified os_object_cluster; modifies free to refer to the number of unallocated bytes in the cluster; modifies contig_free to refer to the number of bytes in the largest contiguous portion of unallocated memory in the cluster.
os_boolean is_empty() const;Returns nonzero (true) if the specified os_object_cluster contains no nondeleted objects; returns 0 (false) otherwise.
static os_object_cluster *of(const void *obj);Returns a pointer to the os_object_cluster containing the object pointed to by obj. If the object is not contained in a cluster, 0 is returned.
os_segment *segment_of() const;Returns a pointer to the segment containing the specified os_object_cluster.
Updated: 03/31/98 17:25:09