All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.usergrid.mq.QueueManager Maven / Gradle / Ivy

There is a newer version: 0.0.27.1
Show newest version
/*******************************************************************************
 * Copyright 2012 Apigee Corporation
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/
package org.usergrid.mq;

import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;


import org.usergrid.persistence.CounterResolution;
import org.usergrid.persistence.Results;


public interface QueueManager {

	public Queue getQueue(String queuePath);

	public Queue updateQueue(String queuePath, Map properties);

	public Queue updateQueue(String queuePath, Queue queue);

	public Message postToQueue(String queuePath, Message message);

	public List postToQueue(String queuePath, List messages);

	public QueueResults getFromQueue(String queuePath, QueueQuery query);

	public Message getMessage(UUID messageId);

	public UUID getNewConsumerId();

	public QueueSet getQueues(String firstQueuePath, int limit);

	public QueueSet subscribeToQueue(String publisherQueuePath,
			String subscriberQueuePath);

	public QueueSet unsubscribeFromQueue(String publisherQueuePath,
			String subscriberQueuePath);

	public QueueSet addSubscribersToQueue(String publisherQueuePath,
			List subscriberQueuePaths);

	public QueueSet removeSubscribersFromQueue(String publisherQueuePath,
			List subscriberQueuePaths);

	public QueueSet subscribeToQueues(String subscriberQueuePath,
			List publisherQueuePaths);

	public QueueSet unsubscribeFromQueues(String subscriberQueuePath,
			List publisherQueuePaths);

	public QueueSet getSubscribers(String publisherQueuePath,
			String firstSubscriberQueuePath, int limit);

	public QueueSet getSubscriptions(String subscriberQueuePath,
			String firstSubscriptionQueuePath, int limit);

	public QueueSet searchSubscribers(String publisherQueuePath, Query query);

	public QueueSet getChildQueues(String publisherQueuePath,
			String firstQueuePath, int count);

	public abstract void incrementAggregateQueueCounters(String queuePath,
			String category, String counterName, long value);

	public abstract Results getAggregateQueueCounters(String queuePath,
			String category, String counterName, CounterResolution resolution,
			long start, long finish, boolean pad);

	public abstract Results getAggregateQueueCounters(String queuePath,
			CounterQuery query) throws Exception;

	public abstract Set getQueueCounterNames(String queuePath)
			throws Exception;

	public abstract void incrementQueueCounters(String queuePath,
			Map counts);

	public abstract void incrementQueueCounter(String queuePath, String name,
			long value);

	public abstract Map getQueueCounters(String queuePath)
			throws Exception;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy