public class ObjectStoreManager extends AbstractAsyncServiceScheduler implements AsyncServiceSchedulerResultsReceiver
AbstractAsyncServiceScheduler.AsyncServiceSchedulerStatus
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.
|
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. |
getStatus
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 scheduledpublic void reportServiceSchedulerResponse(MessageResponse response)
reportServiceSchedulerResponse
in interface AsyncServiceSchedulerResultsReceiver
response
- the response to a previous asynchronous subRequest