/** {@inheritDoc} */
 @Override
 public void removeMessageCounterForQueue(String destinationQueueName) throws AndesException {
   try {
     wrappedAndesContextStoreInstance.removeMessageCounterForQueue(destinationQueueName);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /** {@inheritDoc} */
 @Override
 public void storeNodeDetails(String nodeID, String data) throws AndesException {
   try {
     wrappedAndesContextStoreInstance.storeNodeDetails(nodeID, data);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /** {@inheritDoc} */
 @Override
 public Map<String, String> getAllDurableSubscriptionsByID() throws AndesException {
   try {
     return wrappedAndesContextStoreInstance.getAllDurableSubscriptionsByID();
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /** {@inheritDoc} */
 @Override
 public void updateDurableSubscriptions(Map<String, String> subscriptions) throws AndesException {
   try {
     wrappedAndesContextStoreInstance.updateDurableSubscriptions(subscriptions);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Delete a message id
  *
  * @param messageId id of message
  * @throws AndesException
  */
 @Override
 public void deleteMessageId(long messageId) throws AndesException {
   try {
     wrappedAndesContextStoreInstance.deleteMessageId(messageId);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Get last assigned id for a queue
  *
  * @param queueName name of queue
  * @return last assigned id of queue
  * @throws AndesException
  */
 @Override
 public long getQueueToLastAssignedId(String queueName) throws AndesException {
   try {
     return wrappedAndesContextStoreInstance.getQueueToLastAssignedId(queueName);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Set last published id for a given node
  *
  * @param nodeId id of node
  * @param messageId id of message
  * @throws AndesException
  */
 @Override
 public void setNodeToLastPublishedId(String nodeId, long messageId) throws AndesException {
   try {
     wrappedAndesContextStoreInstance.setNodeToLastPublishedId(nodeId, messageId);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /** {@inheritDoc} */
 @Override
 public void removePublisherNodeId(String nodeId) throws AndesException {
   try {
     wrappedAndesContextStoreInstance.removePublisherNodeId(nodeId);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /** {@inheritDoc} */
 @Override
 public List<AndesExchange> getAllExchangesStored() throws AndesException {
   try {
     return wrappedAndesContextStoreInstance.getAllExchangesStored();
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Add message ids to store
  *
  * @param queueName name of queue
  * @param messageId id of message
  * @throws AndesException
  */
 @Override
 public void addMessageId(String queueName, long messageId) throws AndesException {
   try {
     wrappedAndesContextStoreInstance.addMessageId(queueName, messageId);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Unassign and return slot
  *
  * @param startMessageId start message id of slot
  * @param endMessageId end message id of slot
  * @throws AndesException
  */
 @Override
 public void deleteSlotAssignment(long startMessageId, long endMessageId) throws AndesException {
   try {
     wrappedAndesContextStoreInstance.deleteSlotAssignment(startMessageId, endMessageId);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Select unassigned slots for a given queue name
  *
  * @param queueName name of queue
  * @return unassigned slot object if found
  * @throws AndesException
  */
 @Override
 public Slot selectUnAssignedSlot(String queueName) throws AndesException {
   try {
     return wrappedAndesContextStoreInstance.selectUnAssignedSlot(queueName);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Get all assigned slots for give node
  *
  * @param nodeId id of node
  * @return set of assigned slot objects
  * @throws AndesException
  */
 @Override
 public TreeSet<Slot> getAssignedSlotsByNodeId(String nodeId) throws AndesException {
   try {
     return wrappedAndesContextStoreInstance.getAssignedSlotsByNodeId(nodeId);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Get all slots for a give queue
  *
  * @param queueName name of queue
  * @return set of slot object for queue
  * @throws AndesException
  */
 @Override
 public TreeSet<Slot> getAllSlotsByQueueName(String queueName) throws AndesException {
   try {
     return wrappedAndesContextStoreInstance.getAllSlotsByQueueName(queueName);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Delete message ids by queue name
  *
  * @param queueName name of queue
  * @throws AndesException
  */
 @Override
 public void deleteMessageIdsByQueueName(String queueName) throws AndesException {
   try {
     wrappedAndesContextStoreInstance.deleteMessageIdsByQueueName(queueName);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /** {@inheritDoc} */
 @Override
 public Set<String> getAllQueues() throws AndesException {
   try {
     return wrappedAndesContextStoreInstance.getAllQueues();
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Clear and reset slot storage
  *
  * @throws AndesException
  */
 @Override
 public void clearSlotStorage() throws AndesException {
   try {
     wrappedAndesContextStoreInstance.clearSlotStorage();
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /** {@inheritDoc} */
 @Override
 public Slot getOverlappedSlot(String nodeId, String queueName) throws AndesException {
   try {
     return wrappedAndesContextStoreInstance.getOverlappedSlot(nodeId, queueName);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Set slots states
  *
  * @param startMessageId start message id of slot
  * @param endMessageId end message id of slot
  * @param slotState state of slot
  * @throws AndesException
  */
 @Override
 public void setSlotState(long startMessageId, long endMessageId, SlotState slotState)
     throws AndesException {
   try {
     wrappedAndesContextStoreInstance.setSlotState(startMessageId, endMessageId, slotState);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /** {@inheritDoc} */
 @Override
 public List<AndesBinding> getBindingsStoredForExchange(String exchangeName)
     throws AndesException {
   try {
     return wrappedAndesContextStoreInstance.getBindingsStoredForExchange(exchangeName);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /** {@inheritDoc} */
 @Override
 public void deleteBindingInformation(String exchangeName, String boundQueueName)
     throws AndesException {
   try {
     wrappedAndesContextStoreInstance.deleteBindingInformation(exchangeName, boundQueueName);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Unassign slots by queue name
  *
  * @param nodeId id of node
  * @param queueName name of queue
  * @throws AndesException
  */
 @Override
 public void deleteSlotAssignmentByQueueName(String nodeId, String queueName)
     throws AndesException {
   try {
     wrappedAndesContextStoreInstance.deleteSlotAssignmentByQueueName(nodeId, queueName);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
  /** {@inheritDoc} */
  @Override
  public void storeQueueInformation(String queueName, String queueInfo) throws AndesException {
    try {
      wrappedAndesContextStoreInstance.storeQueueInformation(queueName, queueInfo);

    } catch (AndesStoreUnavailableException exception) {
      notifyFailures(exception);
      throw exception;
    }
  }
 /** {@inheritDoc} */
 @Override
 public void removeDurableSubscription(String destinationIdentifier, String subscriptionID)
     throws AndesException {
   try {
     wrappedAndesContextStoreInstance.removeDurableSubscription(
         destinationIdentifier, subscriptionID);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
  /** {@inheritDoc} */
  @Override
  public DurableStoreConnection init(ConfigurationProperties connectionProperties)
      throws AndesException {

    try {
      return wrappedAndesContextStoreInstance.init(connectionProperties);
    } catch (AndesStoreUnavailableException exception) {
      notifyFailures(exception);
      throw exception;
    }
  }
 /**
  * Update assignment information in slot store
  *
  * @param nodeId id of node
  * @param queueName name of queue
  * @param startMsgId start message id of slot
  * @param endMsgId end message id of slot
  * @throws AndesException
  */
 @Override
 public void createSlotAssignment(String nodeId, String queueName, long startMsgId, long endMsgId)
     throws AndesException {
   try {
     wrappedAndesContextStoreInstance.createSlotAssignment(
         nodeId, queueName, startMsgId, endMsgId);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /** {@inheritDoc} */
 @Override
 public void incrementMessageCountForQueue(String destinationQueueName, long incrementBy)
     throws AndesException {
   try {
     wrappedAndesContextStoreInstance.incrementMessageCountForQueue(
         destinationQueueName, incrementBy);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * Create a new slot in store
  *
  * @param startMessageId start message id of slot
  * @param endMessageId end message id of slot
  * @param storageQueueName name of storage queue name
  * @param assignedNodeId Node id of assigned node
  * @throws AndesException
  */
 @Override
 public void createSlot(
     long startMessageId, long endMessageId, String storageQueueName, String assignedNodeId)
     throws AndesException {
   try {
     wrappedAndesContextStoreInstance.createSlot(
         startMessageId, endMessageId, storageQueueName, assignedNodeId);
   } catch (AndesStoreUnavailableException exception) {
     notifyFailures(exception);
     throw exception;
   }
 }
 /**
  * {@inheritDoc}.
  *
  * <p>Alters the behavior where
  *
  * <ol>
  *   <li>checks the operational status of the wrapped context store
  *   <li>if context store is operational it will cancel the periodic task
  * </ol>
  */
 @Override
 public boolean isOperational(String testString, long testTime) {
   boolean operational = false;
   if (wrappedAndesContextStoreInstance.isOperational(testString, testTime)) {
     operational = true;
     if (storeHealthDetectingFuture != null) {
       // we have detected that store is operational therefore
       // we don't need to run the periodic task to check weather store
       // is available.
       storeHealthDetectingFuture.cancel(false);
       storeHealthDetectingFuture = null;
     }
   }
   return operational;
 }
 /** {@inheritDoc} */
 @Override
 public void close() {
   wrappedAndesContextStoreInstance.close();
 }