public class BoundedWorkQueueStrategy extends Object implements QueueingStrategy
Constructor and Description |
---|
BoundedWorkQueueStrategy(Integer maxNbConcurrentOperations)
Constructor for BoundedWorkQueueStrategy.
|
Modifier and Type | Method and Description |
---|---|
void |
enqueueRequest(Operation operation)
Put the request in the queue.
|
protected int |
getNumWorkerThreads()
Return the maximum number of worker threads that can be used by the WorkQueue (The WorkQueue could have a thread
pool which adjusts its size).
|
protected boolean |
tryEnqueueRequest(Operation op)
Tries to add the provided operation to the work queue if not full so that it will be processed by one of the
worker threads.
|
public BoundedWorkQueueStrategy(Integer maxNbConcurrentOperations)
maxNbConcurrentOperations
- the maximum number of operations that can be concurrently enqueued to the DirectoryServer work queueprotected int getNumWorkerThreads()
public void enqueueRequest(Operation operation) throws LdapException
QueueingStrategy
enqueueRequest
in interface QueueingStrategy
operation
- Operation to put in the queue.LdapException
- If a problem occurs in the Directory Server.protected boolean tryEnqueueRequest(Operation op) throws LdapException
op
- The operation to be added to the work queue.LdapException
- If a problem prevents the operation from being added to the queue (e.g., the queue is full).Copyright 2010-2022 ForgeRock AS.