Examples of MapContainer


Examples of org.apache.activemq.kaha.MapContainer

    public TopicReferenceStore createTopicReferenceStore(ActiveMQTopic destination) throws IOException {
        TopicReferenceStore rc = (TopicReferenceStore)topics.get(destination);
        if (rc == null) {
            Store store = getStore();
            MapContainer messageContainer = getMapReferenceContainer(destination.getPhysicalName(), "topic-data");
            MapContainer subsContainer = getSubsMapContainer(destination.getPhysicalName() + "-Subscriptions", "blob");
            ListContainer<TopicSubAck> ackContainer = store.getListContainer(destination.getPhysicalName(), "topic-acks");
            ackContainer.setMarshaller(new TopicSubAckMarshaller());
            rc = new KahaTopicReferenceStore(store, this, messageContainer, ackContainer, subsContainer,
                                             destination);
            messageStores.put(destination, rc);
View Full Code Here

Examples of org.apache.activemq.kaha.MapContainer

    }

   
    protected MapContainer addSubscriberMessageContainer(String clientId, String subscriptionName) throws IOException {
        String containerName = getSubscriptionContainerName(getSubscriptionKey(clientId, subscriptionName));
        MapContainer container = store.getMapContainer(containerName,containerName);
        container.setKeyMarshaller(Store.MESSAGEID_MARSHALLER);
        Marshaller marshaller = new ConsumerMessageRefMarshaller();
        container.setValueMarshaller(marshaller);
        TopicSubContainer tsc = new TopicSubContainer(container);
        subscriberMessages.put(getSubscriptionKey(clientId, subscriptionName), tsc);
        return container;
    }
View Full Code Here

Examples of org.apache.activemq.kaha.MapContainer

    public synchronized TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException{
        TopicMessageStore rc=(TopicMessageStore)topics.get(destination);
        if(rc==null){
            Store store=getStore();
            ListContainer messageContainer=getListContainer(destination,"topic-data");
            MapContainer subsContainer=getMapContainer(destination.toString()+"-Subscriptions","topic-subs");
            ListContainer ackContainer=store.getListContainer(destination.toString(),"topic-acks");
            ackContainer.setMarshaller(new TopicSubAckMarshaller());
            rc=new KahaTopicMessageStore(store,messageContainer,ackContainer,subsContainer,destination);
            messageStores.put(destination,rc);
            if(transactionStore!=null){
View Full Code Here

Examples of org.apache.activemq.kaha.MapContainer

    }

    public TransactionStore createTransactionStore() throws IOException{
        if(transactionStore==null){
            Store store=getStore();
            MapContainer container=store.getMapContainer(PREPARED_TRANSACTIONS_NAME,"transactions");
            container.setKeyMarshaller(new CommandMarshaller(wireFormat));
            container.setValueMarshaller(new TransactionMarshaller(wireFormat));
            container.load();
            transactionStore=new KahaTransactionStore(this,container);
        }
        return transactionStore;
    }
View Full Code Here

Examples of org.apache.activemq.kaha.MapContainer

        this.useExternalMessageReferences=useExternalMessageReferences;
    }

    protected MapContainer getMapContainer(Object id,String containerName) throws IOException{
        Store store=getStore();
        MapContainer container=store.getMapContainer(id,containerName);
        container.setKeyMarshaller(new StringMarshaller());
        if(useExternalMessageReferences){
            container.setValueMarshaller(new StringMarshaller());
        }else{
            container.setValueMarshaller(new CommandMarshaller(wireFormat));
        }
        container.load();
        return container;
    }
View Full Code Here

Examples of org.apache.activemq.kaha.MapContainer

    }

    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
        RapidMessageStore store = (RapidMessageStore) queues.get(destination);
        if (store == null) {
            MapContainer messageContainer=getMapContainer(destination,"topic-data");
            store = new RapidMessageStore(this, destination, messageContainer);
            queues.put(destination, store);
        }
        return store;
    }
View Full Code Here

Examples of org.apache.activemq.kaha.MapContainer

        }
        return store;
    }

    protected MapContainer getMapContainer(Object id,String containerName) throws IOException{
        MapContainer container=store.getMapContainer(id,containerName);
        container.setKeyMarshaller(new StringMarshaller());
        if(useExternalMessageReferences){
            container.setValueMarshaller(new StringMarshaller());
        }else{
            container.setValueMarshaller(new CommandMarshaller(wireFormat));
        }
        container.load();
        return container;
    }
View Full Code Here

Examples of org.apache.activemq.kaha.MapContainer

    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException {
        RapidTopicMessageStore store = (RapidTopicMessageStore) topics.get(destination);
        if (store == null) {
           
            MapContainer messageContainer=getMapContainer(destination,"topic-data");
            MapContainer subsContainer=getMapContainer(destination.toString()+"-subscriptions","topic-subs");
            MapContainer ackContainer=this.store.getMapContainer(destination.toString(),"topic-acks");
           
            ackContainer.setKeyMarshaller(new StringMarshaller());
            ackContainer.setValueMarshaller(new AtomicIntegerMarshaller());

            store = new RapidTopicMessageStore(this, destination, messageContainer, subsContainer, ackContainer);
            topics.put(destination, store);
        }
        return store;
View Full Code Here

Examples of org.apache.activemq.kaha.MapContainer

    public synchronized TopicMessageStore createTopicMessageStore(ActiveMQTopic destination)
        throws IOException {
        TopicMessageStore rc = topics.get(destination);
        if (rc == null) {
            Store store = getStore();
            MapContainer messageContainer = getMapContainer(destination, "topic-data");
            MapContainer subsContainer = getSubsMapContainer(destination.toString() + "-Subscriptions",
                                                             "topic-subs");
            ListContainer<TopicSubAck> ackContainer = store.getListContainer(destination.toString(),
                                                                             "topic-acks");
            ackContainer.setMarshaller(new TopicSubAckMarshaller());
            rc = new KahaTopicMessageStore(store, messageContainer, ackContainer, subsContainer, destination);
View Full Code Here

Examples of org.apache.activemq.kaha.MapContainer

    public TransactionStore createTransactionStore() throws IOException {
        if (transactionStore == null) {
            while (true) {
                try {
                    Store store = getStore();
                    MapContainer container = store
                        .getMapContainer(PREPARED_TRANSACTIONS_NAME, "transactions");
                    container.setKeyMarshaller(new CommandMarshaller(wireFormat));
                    container.setValueMarshaller(new TransactionMarshaller(wireFormat));
                    container.load();
                    transactionStore = new KahaTransactionStore(this, container);
                    break;
                } catch (StoreLockedExcpetion e) {
                    LOG.info("Store is locked... waiting " + (STORE_LOCKED_WAIT_DELAY / 1000)
                             + " seconds for the Store to be unlocked.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.