edu.isi.pegasus.planner.refiner
public class ThreadPool extends Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
ThreadPool.AuthenticateThread
A thread as an inner class, that authenticates against one particular
pool.
|
(package private) class |
ThreadPool.ConditionVariable
A wrapper around an int that acts as a Condition Variable, and is used
as such.
|
Modifier and Type | Field and Description |
---|---|
private GSSCredential |
mCredential
The credential loaded from the non default location if specified.
|
private ThreadPool.ConditionVariable |
mCurrentNum
The condition variable that is used to synchronize the shutdown.
|
private Set |
mExecPools
The Set of pools that need to be authenticated against.
|
private ENV |
mLocalEnv
The namespace object holding the environment variables for local
pool.
|
private LogManager |
mLogger
The handle to the LogManager object.
|
private Integer |
mNumOfPools
The number of pools that one has to authenticate against.
|
private PoolInfoProvider |
mPoolHandle
The handle to the Pool Info Provider.
|
private PegasusProperties |
mProps
The handle to the properties object.
|
private LinkedList |
mQueue
The request queue that holds the authenticate requests.
|
private ThreadPool.AuthenticateThread[] |
mWorkers
The handle to the pool of threads that this thread pool is reponsible for.
|
static int |
NUMBER_OF_THREADS
The maximum number of authentication threads that are spawned.
|
Constructor and Description |
---|
ThreadPool(PegasusProperties properties,
Set pools)
The overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptRequest(Object request)
Accepts an authentication request, that has to be serviced.
|
private GSSCredential |
getGSSCredential(String file)
Loads a GSSCredential from the proxy file residing at the path specified.
|
private ENV |
loadLocalEnvVariables()
Reads in the environment variables into memory from the properties file
and the pool catalog.
|
void |
shutdown()
This method is called to ensure the clean shutdown of threads, and
waits till all the requests have been serviced.
|
public static final int NUMBER_OF_THREADS
private LinkedList mQueue
private PegasusProperties mProps
private PoolInfoProvider mPoolHandle
private LogManager mLogger
private Set mExecPools
private Integer mNumOfPools
private ThreadPool.AuthenticateThread[] mWorkers
private ThreadPool.ConditionVariable mCurrentNum
private ENV mLocalEnv
private GSSCredential mCredential
public ThreadPool(PegasusProperties properties, Set pools)
properties
- the PegasusProperties
to be used.pools
- the set of pools against which the user is authenticating.public void shutdown()
public void acceptRequest(Object request)
private ENV loadLocalEnvVariables()
ENV
namespace object holding the environment
variables.private GSSCredential getGSSCredential(String file)
file
- the path to the proxy file.