ObjectStore C++ API Reference

os_lock_timeout_exception

Instances of this class contain information on the circumstances preventing acquisition of a lock within a specified timeout period. An exception of this type can be signaled by processes that have called the set_readlock_timeout() or set_writelock_timeout() member of os_segment, os_database, or objectstore. A pointer to an instance of this class can be returned by objectstore::acquire_lock().

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_lock_timeout_exception::get_application_names()

os_char_p *get_application_names();
Returns an array of strings naming the applications preventing lock acquisition. This array is parallel to the arrays returned by get_hostnames() and get_pids(); that is, the ith element of get_application_names() contains information about the same process as the ith elements of get_hostnames() and get_pids(). The member function number_of_blockers() returns the number of elements in these arrays. Deleting the os_lock_timeout_exception deallocates the arrays.

os_lock_timeout_exception::get_fault_addr()

void *get_fault_addr();
Returns the address on which ObjectStore faulted, causing the database access leading to the attempted lock acquisition.

os_lock_timeout_exception::get_hostnames()

os_char_p *get_hostnames();
Returns an array of strings naming the host machines running the applications preventing lock acquisition. This array is parallel to the arrays returned by get_application_names() and get_pids(); that is, the ith element of get_hostnames() contains information about the same process as the ith elements of get_application_names() and get_pids(). The member function number_of_blockers() returns the number of elements in these arrays. Deleting the os_lock_timeout_exception deallocates the arrays.

os_lock_timeout_exception::get_lock_type()

os_int32 get_lock_type();
Returns a value (os_read_lock or os_write_lock) indicating the type of lock ObjectStore was requesting when the timeout occurred.

os_lock_timeout_exception::get_pids()

os_unsigned_int32 *get_pids();
Returns an array of integers indicating the process IDs of the processes preventing lock acquisition. This array is parallel to the arrays returned by get_application_names() and get_hostnames(); that is, the ith element of get_pids() contains information about the same process as the ith elements of get_application_names() and get_hostnames(). The member function number_of_blockers() returns the number of elements in these arrays. Deleting the os_lock_timeout_exception deallocates the arrays.

os_lock_timeout_exception::number_of_blockers()

os_int32 number_of_blockers();
Returns the number of processes preventing lock acquisition.



[previous] [next]

Copyright © 1997 Object Design, Inc. All rights reserved.

Updated: 03/31/98 17:25:09