public class ObjectStoreManager extends AbstractAsyncServiceScheduler implements AsyncServiceSchedulerResultsReceiver
AbstractAsyncServiceScheduler.AsyncServiceSchedulerStatus
Modifier and Type | Field and Description |
---|---|
protected static int |
MAX_SEGMENTS_PER_BATCH
Maximum number of segments to send in one batch.
|
Constructor and Description |
---|
ObjectStoreManager(AsyncServiceSchedulerResultsReceiver resultsReceiver,
ObjectStorePool objectStorePool)
Constructs new ObjectStoreManager.
|
ObjectStoreManager(AsyncServiceSchedulerResultsReceiver resultsReceiver,
ObjectStorePool objectStorePool,
int requestQueueSize)
Constructs new ObjectStoreManager.
|
Modifier and Type | Method and Description |
---|---|
boolean |
pause()
Pauses ObjectStoreManager.
|
protected void |
processRequestFromRequestQueue(MessageRequest request)
Processes a request that was pulled from the request queue.
|
void |
reportServiceSchedulerResponse(MessageResponse response)
Processes a response to a batched subRequest from ObjectStorePool.
|
boolean |
resume()
Resumes ObjectStoreManager.
|
boolean |
shutdown()
Shuts down the ObjectStoreManager, cleaning up resources.
|
boolean |
startUp()
Starts up the ObjectStoreManager, so it is ready to consume and process requests.
|
MessageStatusCode |
submitRequest(MessageRequest request)
Submits a
ObjectStoreRequest to ObjectStoreManager. |
getResultsReceiver, getStatus
protected static final int MAX_SEGMENTS_PER_BATCH
public ObjectStoreManager(AsyncServiceSchedulerResultsReceiver resultsReceiver, ObjectStorePool objectStorePool, int requestQueueSize)
resultsReceiver
- subscriber to send responses to viaobjectStorePool
- object store pool for handling ObjectStoreRequests.requestQueueSize
- requestQueueSize maximum capacity of ObjectStoreManager's request queue.
AsyncServiceSchedulerResultsReceiver.reportServiceSchedulerResponse(MessageResponse)
.public ObjectStoreManager(AsyncServiceSchedulerResultsReceiver resultsReceiver, ObjectStorePool objectStorePool)
resultsReceiver
- subscriber to send responses to viaobjectStorePool
- object store pool for handling ObjectStoreRequests.
AsyncServiceSchedulerResultsReceiver.reportServiceSchedulerResponse(MessageResponse)
.public boolean startUp()
startUp
in class AbstractAsyncServiceScheduler
public boolean shutdown()
shutdown
in class AbstractAsyncServiceScheduler
public boolean pause()
pause
in class AbstractAsyncServiceScheduler
public boolean resume()
resume
in class AbstractAsyncServiceScheduler
public MessageStatusCode submitRequest(MessageRequest request)
ObjectStoreRequest
to ObjectStoreManager. Schedules request to be executed
asynchronously.
Note: ObjectStoreManager expects to only have one request for a given Topic/Partition and request type at a time.submitRequest
in class AbstractAsyncServiceScheduler
request
- request to be scheduledprotected void processRequestFromRequestQueue(MessageRequest request)
processRequestFromRequestQueue
in class AbstractAsyncServiceScheduler
request
- request to be processedpublic void reportServiceSchedulerResponse(MessageResponse response)
reportServiceSchedulerResponse
in interface AsyncServiceSchedulerResultsReceiver
response
- the response to a previous asynchronous subRequest