Package org.apache.activemq.kaha

Examples of org.apache.activemq.kaha.ListContainer


    }

    public void deleteSubscription(String clientId,String subscriptionName) throws IOException{
        String key=getSubscriptionKey(clientId,subscriptionName);
        subscriberContainer.remove(key);
        ListContainer list=(ListContainer)subscriberAcks.get(key);
        for(Iterator i=list.iterator();i.hasNext();){
            String id=i.next().toString();
            AtomicInteger count=(AtomicInteger)ackContainer.remove(id);
            if(count!=null){
                if(count.decrementAndGet()>0){
                    ackContainer.put(id,count);
View Full Code Here


        return (SubscriptionInfo[])subscriberContainer.values().toArray(
                new SubscriptionInfo[subscriberContainer.size()]);
    }

    protected void addSubscriberAckContainer(Object key) throws IOException{
        ListContainer container=store.getListContainer(key,"durable-subs");
        Marshaller marshaller=new StringMarshaller();
        container.setMarshaller(marshaller);
        subscriberAcks.put(key,container);
    }
View Full Code Here

    public MessageId getNextMessageIdToDeliver(String clientId,String subscriptionName,MessageId messageId)
            throws IOException{
        MessageId result=null;
        boolean getNext=false;
        String key=getSubscriptionKey(clientId,subscriptionName);
        ListContainer list=(ListContainer)subscriberAcks.get(key);
        Iterator iter=list.iterator();
        for(Iterator i=list.iterator();i.hasNext();){
            String id=i.next().toString();
            if(id.equals(messageId.toString())){
                getNext=true;
            }else if(getNext){
                result=new MessageId(id);
View Full Code Here

    public MessageId getPreviousMessageIdToDeliver(String clientId,String subscriptionName,MessageId messageId)
            throws IOException{
        MessageId result=null;
        String previousId=null;
        String key=getSubscriptionKey(clientId,subscriptionName);
        ListContainer list=(ListContainer)subscriberAcks.get(key);
        Iterator iter=list.iterator();
        for(Iterator i=list.iterator();i.hasNext();){
            String id=i.next().toString();
            if(id.equals(messageId.toString())){
                if(previousId!=null){
                    result=new MessageId(previousId);
                }
View Full Code Here

        return result;
    }

    public int getMessageCount(String clientId,String subscriberName) throws IOException{
        String key=getSubscriptionKey(clientId,subscriberName);
        ListContainer list=(ListContainer)subscriberAcks.get(key);
        return list.size();
    }
View Full Code Here

        result+=subscriberName!=null?subscriberName:"NOT_SET";
        return result;
    }

    protected void addSubscriberMessageContainer(Object key) throws IOException{
        ListContainer container=store.getListContainer(key,"topic-subs");
        Marshaller marshaller=new ConsumerMessageRefMarshaller();
        container.setMarshaller(marshaller);
        TopicSubContainer tsc=new TopicSubContainer(container);
        subscriberMessages.put(key,tsc);
    }
View Full Code Here

            MapContainer container = getMapContainer(id.getKey(), id.getDataContainerName());
            container.clear();
        }
        for (Iterator i = listsContainer.getKeys().iterator(); i.hasNext();) {
            ContainerId id = (ContainerId)i.next();
            ListContainer container = getListContainer(id.getKey(), id.getDataContainerName());
            container.clear();
        }

    }
View Full Code Here

            MapContainer container = getMapContainer(id.getKey(), id.getDataContainerName());
            container.clear();
        }
        for (Iterator i = listsContainer.getKeys().iterator(); i.hasNext();) {
            ContainerId id = (ContainerId)i.next();
            ListContainer container = getListContainer(id.getKey(), id.getDataContainerName());
            container.clear();
        }

    }
View Full Code Here

            MapContainer container = getMapContainer(id.getKey(), id.getDataContainerName());
            container.clear();
        }
        for (Iterator i = listsContainer.getKeys().iterator(); i.hasNext();) {
            ContainerId id = (ContainerId)i.next();
            ListContainer container = getListContainer(id.getKey(), id.getDataContainerName());
            container.clear();
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.kaha.ListContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.