Package com.ms.util
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis Package Next
Package com.ms.util   Previous This
Package
Next

 


Class ThreadLocalStorage

public class ThreadLocalStorage
{
  // Constructors
  public ThreadLocalStorage();

  // Methods
  protected void finalize();
  public Object get();
  public void release();
  public void set(Object obj);
}

This class allows applications to store a per-thread reference to a Java object.

Constructors

ThreadLocalStorage

public ThreadLocalStorage();

Creates a new per-thread storage object for application use.

Methods

finalize

protected void finalize();

Performs cleanup tasks before garbage collection.

Return Value:

No return value

get

public Object get();

Retrieves the per-thread object stored in this storage object.

Return Value:

Returns the per-thread object stored in this storage object.

release

public void release();

Destroys the storage object. The finalize method will perform this task for you, but because storage objects are scarce resources, you should use this method to release them in a timely manner.

Return Value:

No return value.

set

public void set(Object obj);

Stores a specified per-thread object in the storage object.

Return Value:

No return value.

ParameterDescription
obj The new object to store.

upnrm.gif