State-based object transition control and attribute-based locking
First Claim
1. A method for attribute based locking of an object, the method comprising:
- receiving at a first object a request to perform a first action;
write-locking of the first object by itself;
transitioning of the first object from a first state to a transition state;
unlocking the first object while in the transition state;
spawning a first thread from the first object while in the transition state to perform operations in response to the first action;
receiving at the first object in the transition state a write-lock request from the first thread, the first thread requesting special permission to write-lock the first object while the first object is in the transition state;
receiving at the first thread a write-lock on the first object while the first object is in the transition state;
completing the first action by transitioning the first object from the transition state to a non-transition state and unlocking the first object; and
wherein threads not on the spawned thread will not be given locks on the first object in the transition state until the object is in the non-transition state.
4 Assignments
0 Petitions
Accused Products
Abstract
Temporary states are used transitionally in run-time situations and are unknown to the object database. A temporary state is created if, when an object is performing a requested event, interim work needs to be performed before the object reaches a permanent destination state. Use of a temporary state is transparent to the caller of the requested event. Within a single flow of control, an unlimited number of nested locks may be acquired. A request to unlock an object will only truly unlock the object if the unlock requester is at the highest level of locking. For recursive or embedded functions, no knowledge of the previous locking condition is necessary. Attribute-based locking provides a mechanism for allowing only certain members of the system to lock an object for writing while the object is in a predetermined state. However, any thread may obtain a read lock on an object in order to examine its attributes. This may be expanded to state that the system may restrict locking of an object or entity based upon any attribute in the database or upon any combination or logical expression of these attributes.
-
Citations
5 Claims
-
1. A method for attribute based locking of an object, the method comprising:
-
receiving at a first object a request to perform a first action; write-locking of the first object by itself; transitioning of the first object from a first state to a transition state; unlocking the first object while in the transition state; spawning a first thread from the first object while in the transition state to perform operations in response to the first action; receiving at the first object in the transition state a write-lock request from the first thread, the first thread requesting special permission to write-lock the first object while the first object is in the transition state; receiving at the first thread a write-lock on the first object while the first object is in the transition state; completing the first action by transitioning the first object from the transition state to a non-transition state and unlocking the first object; and wherein threads not on the spawned thread will not be given locks on the first object in the transition state until the object is in the non-transition state. - View Dependent Claims (2, 3, 4)
-
-
5. A method for attribute-based locking of an object, wherein the object moves from a first state to a transition state in order to perform predetermined operations, said transition state locking said object from access by threads not related to the transition operations, said object transitioning to a second state and unlocking upon completion of the transition state operations.
Specification