ResourceManager - Oracle 9i

Syntax:

Constructors

ResourceManager(int):

public ResourceManager(int i)

The ResourceManager constructor

Parameters

<code>i</code> - the number of resources to manage

Methods

activeFound():

public boolean activeFound()

Checks if any of the logical resources being managed are in active use

Returns

true - if one or more resource is in use false - if none of the resources are in use

getResource():

public synchronized void getResource()

If the number of resources available for use is nonzero, the method decreases the number of resources by one. Otherwise, it waits until a resource is released & it becomes available for use.

releaseResource():

public void releaseResource()

Releases a resource. When this method is called, the number of resources available is increased by one.

sleep(int):

public void sleep(int i)

Allows usage of Thread.sleep() without try/catch


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 9i Topics