public class TaskQueueService extends Object
Modifier and Type | Method and Description |
---|---|
void |
finishClusterTask(FinishTaskRequest finishRequest)
Records the status of a finished task from provisioner.
|
Map<String,QueueMetrics> |
getTaskQueueMetricsSnapshot()
Get a snapshot of the number of queued and in progress elements for all queues in the task queues.
|
QueueMetrics |
getTaskQueueMetricsSnapshot(String tenantId)
Get the queue metrics for the given tenant.
|
String |
takeNextClusterTask(TakeTaskRequest takeRequest)
Returns the next task from task queue that can be handed out for provisioning.
|
public Map<String,QueueMetrics> getTaskQueueMetricsSnapshot() throws IOException
IOException
public QueueMetrics getTaskQueueMetricsSnapshot(String tenantId) throws IOException
tenantId
- Id of the tenant to get queue metrics forIOException
public String takeNextClusterTask(TakeTaskRequest takeRequest) throws IOException, MissingEntityException
takeRequest
- Request to take a task.MissingEntityException
- if there is no provisioner for the provisioner id in the request.IOException
- if there was an error persisting task information.public void finishClusterTask(FinishTaskRequest finishRequest) throws MissingEntityException, IOException
finishRequest
- Request to finish a task.MissingEntityException
- if there is no provisioner for the provisioner id in the request.IOException
- if there was an error persisting task information.Copyright © 2013-2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.