Accelerated Cached Object Retrieval
First Claim
1. In an object-oriented software programming environment, a method for creating and retrieving an object, comprising:
- responsive to a call for a first invocation of a method of an object;
executing a first version of method code associated with the object; and
configuring the object to automatically execute a second version of the method code on subsequent invocation of the method of the object; and
responsive to a call for a subsequent invocation of the method;
executing the second version of the method code.
1 Assignment
0 Petitions
Accused Products
Abstract
Efficiency of cached objects such as singleton objects and other software constructs having a first-invocation cost is improved by replacing the software code for creating a method instance (the “creation code”) with the instance itself. Upon first invocation, the calling method causes the first version of the method to be performed, and also causes the first version to be replaced by the second version. Thus, the invention facilitates creation of singleton objects that run without any branch logic, so as to improve speed and efficiency. The need for locking and exception handling is reduced, resultant code is simplified, and potential for error is reduced.
12 Citations
25 Claims
-
1. In an object-oriented software programming environment, a method for creating and retrieving an object, comprising:
-
responsive to a call for a first invocation of a method of an object; executing a first version of method code associated with the object; and configuring the object to automatically execute a second version of the method code on subsequent invocation of the method of the object; and responsive to a call for a subsequent invocation of the method; executing the second version of the method code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. In an object-oriented software programming environment, a system for creating and retrieving an object, comprising:
-
a software object, comprising; a first version of method code; and a second version of method code; wherein, responsive to a call for a first invocation of a method of an object, the software object; executes the first version of the method code and is configured to automatically execute the second version of the method code on subsequent invocation of the method of the object; and wherein, responsive to a call for a subsequent invocation of the method, the software object; executes the second version of the method code. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21)
-
-
22. A computer program product for creating and retrieving an object in an object-oriented software programming environment, comprising:
-
a computer-readable medium; and computer program code, encoded on the medium, for; responsive to a call for a first invocation of a method of an object; executing a first version of method code associated with the object; and configuring the object to automatically execute a second version of the method code on subsequent invocation of the method of the object; and responsive to a call for a subsequent invocation of the method; executing the second version of the method code. - View Dependent Claims (23, 24, 25)
-
Specification