Patentable/Patents/US-6752836
US-6752836

Method and apparatus for high-concurrency client locking with java in a data processing system

PublishedJune 22, 2004
Assigneenot available in USPTO data we have
Inventorsnot available in USPTO data we have
Technical Abstract

The present invention provides a method and apparatus in a data processing system for managing access to objects (called an element) in a collection of objects (called a container) in a high-concurrency environment. A request is received from a requester for an element's mutex given an identifier for the element. This mutex can be used as a mutex in a synchronized block to lock the object during that synchronized block. To compute the mutex for an element, the first instance seen by the container of the element's identifier is used. To do this, a determination is made as to whether there is already an instance of the identifier with the same value in a value set. If so, that value is returned to the requester for use as a mutex. If not, the current identifier instance is saved in the value set and returned. This allows the object to be locked prior to the existence of the object.

Patent Claims
18 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. A method for multithreaded execution in a data processing system for managing access to objects in a container by way of synchronized blocks, the method comprising: using an identifier object to retrieve a mutex object from a value set, wherein the identifier object has a value that distinguishes the mutex object from other objects in the value set and that also distinguishes a desired object from other objects in the container; in response to retrieving the mutex object from the value set, entering a synchronized block that locks the mutex object; while in the synchronized block that locks the mutex object, accessing the container to determine whether the desired object is present within the container; while in the synchronized block that locks the mutex object, in response to a determination that the desired object is not within the container, producing the desired object from an alternative source for insertion into the container; while in the synchronized block that locks the mutex object, accessing the desired object from the container; and exiting the synchronized block that locks the mutex object, whereby mutual exclusion with respect to accessing the desired object is maintained regardless or whether the desired object is present with the container.

2

2. The method of claim 1 , wherein retrieving the mutex object from the value set includes: determining whether any mutex object that is associated with the value of the identifier object exists within the value set; and in response to a determination that no mutex object that is associated with the value of the identifier object exists within the value set, creating the mutex object for insertion into the value set.

3

3. The method of claim 1 , wherein the synchronized block that locks the mutex object is a first synchronized block and accessing the desired object from the container includes: while in the first synchronized block, entering a second synchronized block that locks the container; while in the second synchronized block, retrieving the desired object from the container; and exiting the second synchronized block.

4

4. The method of claim 1 , wherein the identifier object is a string.

5

5. The method of claim 1 , wherein the container is a cache.

6

6. The method of claim 1 , wherein the method is executed in a Java virtual machine.

7

7. A multithreaded computer program product for managing access to objects in a container by way of synchronized blocks, the computer program product being in a computer-readable medium and comprising instructions that, when executed by a computer, cause the computer to perform actions that include: using an identifier object to retrieve a mutex object from a value set, wherein the identifier object has a value that distinguishes the mutex object from other objects in the value set and that also distinguishes a desired object from other objects in the container; in response to retrieving the mutex object from the value set, entering a synchronized block that locks the mutex object; while in the synchronized block that locks the mutex object, accessing the container to determine whether the desired object is present within the container; while in the synchronized block that locks the mutex object, in response to a determination that the desired object is not within the container, producing the desired object from an alternative source for insertion into the container; while in the synchronized block that locks the mutex object, accessing the desired object from the container; and exiting the synchronized block that locks the mutex object, whereby mutual exclusion with respect to accessing the desired object is maintained regardless of whether the desired object is present within the container.

8

8. The computer program product of claim 7 , wherein retrieving the mutex object from the value set includes: determining whether any mutex object that is associated with the value of the identifier object exists within the value set; and in response to a determination that no mutex object that is associated with the value of the identifier object exists within the value set, creating the mutex object for insertion into the container.

9

9. The computer program product of claim 7 , wherein the synchronized block that locks the mutex object is a first synchronized block and accessing the desired object from the container includes: while in the first synchronized block, entering a second synchronized block that locks the container; while in the second synchronized block, retrieving the desired object from the container; and exiting the second synchronized block.

10

10. The computer program product of claim 7 , wherein the identifier object is a string.

11

11. The computer program product of claim 7 , wherein the container is a cache.

12

12. The computer program product of claim 7 , wherein the instructions are executed in a Java virtual machine.

13

13. A data processing system for managing access to objects in a container by way of synchronized blocks comprising: means for using an identifier object to retrieve a mutex object from a value set, wherein the identifier object has a value that distinguishes the mutex object from other objects in the value set and that also distinguishes a desired object from other objects in the container; means, responsive to retrieving the mutex object from the value set, for entering a synchronized block that locks the mutex object; means, operative while in the synchronized block that locks the mutex object, for accessing the containew to determine whether the desired object is present within the container; means, operative while in the synchronized block that locks the mutex object and responsive to a determination that the desired object is not within the container, for producing the desired object from an alternative source for insertion into the container; means, operative while in the synchronized block that locks the mutex object, for accessing the desired object form the container; and means for exiting the synchronized block that locks the mutex object, whereby mutual exclusion with respect to accessing the desired object is maintained regardless of whether the desired object is present with the container.

14

14. The data processing system of claim 13 , wherein the means for retrieving the mutex object from the value set includes: means for determining whether any mutex object that is associated with the value of the identifier object exists within the value set; and means, responsive to a determination that no mutex object that is associated with the value of the identifier object exists within the value set, for creating the mutex object for insertion into the value set.

15

15. The data processing system of claim 13 , wherein the synchronized block that locks the mutex object is a first synchronized block and the means for accessing the desired object from the container includes: means, operative while in the first synchronized block, for entering a second synchronized block that locks the container; means, operative while in the second synchronized block, for retrieving the desired object from the container; and means for exiting the second synchronized block.

16

16. The data processing system of claim 13 , wherein the identifier object is a string.

17

17. The data processing system of claim 13 , wherein the container is a cache.

18

18. The data processing system of claim 13 , wherein the data processing system is executed in a Java virtual machine.

Classification Codes (CPC)

Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.

Patent Metadata

Filing Date

July 22, 1999

Publication Date

June 22, 2004

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “Method and apparatus for high-concurrency client locking with java in a data processing system” (US-6752836). https://patentable.app/patents/US-6752836

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.