Examples of DurableConfigurationStore


Examples of org.apache.qpid.server.store.DurableConfigurationStore

                    try
                    {
                        queue.delete();
                        if (queue.isDurable() && !queue.isAutoDelete())
                        {
                            DurableConfigurationStore store = virtualHost.getDurableConfigurationStore();
                            store.removeQueue(queue);
                        }
                    }
                    catch (AMQException e)
                    {
                        exception(session, method, e, "Cannot delete queue '" + queueName);
View Full Code Here

Examples of org.apache.qpid.server.store.DurableConfigurationStore

            if (queue.isDurable() && !(queue.getLifetimePolicy()
                                       == LifetimePolicy.DELETE_ON_CONNECTION_CLOSE
                                       || queue.getLifetimePolicy()
                                          == LifetimePolicy.DELETE_ON_SESSION_END))
            {
                DurableConfigurationStore store = getDurableConfigurationStore();
                DurableConfigurationStoreHelper.removeQueue(store, queue);
            }
            return purged;
        }
    }
View Full Code Here

Examples of org.apache.qpid.server.store.DurableConfigurationStore

        return messageStore;
    }

    private DurableConfigurationStore initialiseConfigurationStore(VirtualHost virtualHost)
    {
        DurableConfigurationStore configurationStore;
        final Object storeTypeAttr = virtualHost.getAttribute(VirtualHost.CONFIG_STORE_TYPE);
        String storeType = storeTypeAttr == null ? null : String.valueOf(storeTypeAttr);

        if(storeType != null)
        {
View Full Code Here

Examples of org.apache.qpid.server.store.DurableConfigurationStore

    @Override
    public void queueDeclare(Session session, final QueueDeclare method)
    {

        final VirtualHost virtualHost = getVirtualHost(session);
        DurableConfigurationStore store = virtualHost.getDurableConfigurationStore();

        String queueName = method.getQueue();
        AMQQueue queue;
        //TODO: do we need to check that the queue already exists with exactly the same "configuration"?
View Full Code Here

Examples of org.apache.qpid.server.store.DurableConfigurationStore

    @Override
    public void queueDeclare(Session session, final QueueDeclare method)
    {

        final VirtualHostImpl virtualHost = getVirtualHost(session);
        DurableConfigurationStore store = virtualHost.getDurableConfigurationStore();

        String queueName = method.getQueue();
        AMQQueue queue;
        //TODO: do we need to check that the queue already exists with exactly the same "configuration"?
View Full Code Here

Examples of org.apache.qpid.server.store.DurableConfigurationStore

    public void methodReceived(AMQStateManager stateManager, QueueDeleteBody body, int channelId) throws AMQException
    {
        AMQProtocolSession protocolConnection = stateManager.getProtocolSession();
        VirtualHost virtualHost = protocolConnection.getVirtualHost();
        DurableConfigurationStore store = virtualHost.getDurableConfigurationStore();


        AMQChannel channel = protocolConnection.getChannel(channelId);

        if (channel == null)
View Full Code Here

Examples of org.apache.qpid.server.store.DurableConfigurationStore

                                                                   mock(EventLogger.class),
                                                                   mock(LogRecorder.class),
                                                                   brokerOptions);

        parentObject.open();
        DurableConfigurationStore configurationStore = parentObject.getConfigurationStore();
        configurationStore.closeConfigurationStore();

        final List<ConfiguredObjectRecord> initialRecords = new ArrayList<>();
        _store.visitConfiguredObjectRecords(new ConfiguredObjectRecordHandler()
        {
            @Override
            public void begin()
            {

            }

            @Override
            public boolean handle(final ConfiguredObjectRecord record)
            {
                initialRecords.add(record);
                return true;
            }

            @Override
            public void end()
            {

            }
        });


        configurationStore.openConfigurationStore(parentObject,true,initialRecords.toArray(new ConfiguredObjectRecord[initialRecords.size()]));
        configurationStore.closeConfigurationStore();
        return true;
    }
View Full Code Here

Examples of org.apache.qpid.server.store.DurableConfigurationStore

        node.start();
        _helper.assertNodeRole(node, "MASTER", "REPLICA");

        assertEquals("Unexpected node state", State.ACTIVE, node.getState());

        DurableConfigurationStore store = node.getConfigurationStore();
        assertNotNull(store);

        BDBConfigurationStore bdbConfigurationStore = (BDBConfigurationStore) store;
        ReplicatedEnvironment environment = (ReplicatedEnvironment) bdbConfigurationStore.getEnvironmentFacade().getEnvironment();
        ReplicationConfig replicationConfig = environment.getRepConfig();
View Full Code Here

Examples of org.apache.qpid.server.store.DurableConfigurationStore

        LogRecorder logRecorder = new LogRecorder();

        _taskExecutor.start();
        SystemConfig systemConfig = configFactory.newInstance(_taskExecutor, _eventLogger, logRecorder, options);
        systemConfig.open();
        DurableConfigurationStore store = systemConfig.getConfigurationStore();

        _applicationRegistry = new ApplicationRegistry(store, systemConfig);
        try
        {
            _applicationRegistry.initialise(options);
View Full Code Here

Examples of org.apache.qpid.server.store.DurableConfigurationStore

    public void onValidate()
    {
        super.onValidate();

        VirtualHostNode<?> virtualHostNode = getParent(VirtualHostNode.class);
        DurableConfigurationStore configurationStore = virtualHostNode.getConfigurationStore();
        if (!(configurationStore instanceof MessageStoreProvider))
        {
            throw new IllegalConfigurationException(VIRTUAL_HOST_TYPE +
                                                    " virtual host can only be used where the node's store ("
                                                    + configurationStore.getClass().getName()
                                                    + ") is a message store provider. ");
        }
    }
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.