Interface ExecutionQueueService


public interface ExecutionQueueService
User: Date: 10/09/12 Responsible for the Execution Queue
  • Method Details

    • enqueue

      void enqueue(List<ExecutionMessage> messages)
      enqueue messages to the queue
      Parameters:
      messages - the messages to enqueue
    • poll

      List<ExecutionMessage> poll(String workerId, int maxSize, long workerPollingMemory, ExecStatus... statuses)
      polls messages from the queue
      Parameters:
      workerId - the id of the worker
      maxSize - max size of the poll bulk
      statuses - requested messages statuses
      Returns:
      a List of ExecutionMessage requested
    • pollRecovery

      List<ExecutionMessage> pollRecovery(String workerId, int maxSize, ExecStatus... statuses)
      polls messages from the queue
      Parameters:
      workerId - the id of the worker
      maxSize - max size of the poll bulk
      statuses - requested messages statuses
      Returns:
      a List of ExecutionMessage requested
    • pollMessagesWithoutAck

      List<ExecutionMessage> pollMessagesWithoutAck(int maxSize, long minVersionAllowed)
      polls messages that didn't receive ack yet
      Parameters:
      maxSize - max size of the poll bulk
      minVersionAllowed - min version that the messages didn't send ack
      Returns:
      a List of ExecutionMessage requested
    • readPayloadByExecutionIds

      Map<Long,Payload> readPayloadByExecutionIds(Long... executionIds)
      get the payloads for requested execution ids
      Parameters:
      executionIds - the execution ids to get payload for
      Returns:
      a map of the execution id and its payload
    • readMessagesByStatus

      List<ExecutionMessage> readMessagesByStatus(int maxSize, ExecStatus... statuses)
      Parameters:
      maxSize - max size of the poll bulk
      statuses - the requested statuses of the messages
      Returns:
      a List of ExecutionMessage requested
    • countMessagesWithoutAckForWorker

      int countMessagesWithoutAckForWorker(int maxSize, long minVersionAllowed, String workerUuid)
      polls the count of messages that didn't receive ack for a number of recovery versions
      Parameters:
      maxSize - max size of the poll bulk
      minVersionAllowed - min version that the messages didn't send ack
      workerUuid - the id of the associated worker
      Returns:
      the number of messages that didn't receive ack for a number of recovery versions