Package org.apache.qpid.server.store

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


        }

        private boolean unknownExchange(final String exchangeIdString)
        {
            UUID exchangeId = UUID.fromString(exchangeIdString);
            ConfiguredObjectRecord localRecord = getUpdateMap().get(exchangeId);
            return !((localRecord != null && localRecord.getType().equals(Exchange.class.getSimpleName()))
                     || _exchangeRegistry.getExchange(exchangeId) != null);
        }
View Full Code Here


        }

        private boolean unknownQueue(final String queueIdString)
        {
            UUID queueId = UUID.fromString(queueIdString);
            ConfiguredObjectRecord localRecord = getUpdateMap().get(queueId);
            return !((localRecord != null  && localRecord.getType().equals(Queue.class.getSimpleName()))
                     || _virtualHost.getQueue(queueId) != null);
        }
View Full Code Here

                        newAttributes.putAll(QueueArgumentsConverter.convertWireArgsToModel((Map<String, Object>) attributes
                                .get(ARGUMENTS)));
                    }
                    newAttributes.putAll(attributes);
                    attributes = newAttributes;
                    getUpdateMap().put(id, new ConfiguredObjectRecord(id,type,attributes));
                }

                getNextUpgrader().configuredObject(id,type,attributes);
            }
View Full Code Here

    @Override
    public void createExchange(Exchange exchange) throws AMQStoreException
    {
        if (_stateManager.isInState(State.ACTIVE))
        {
            ConfiguredObjectRecord configuredObject = _configuredObjectHelper.createExchangeConfiguredObject(exchange);
            insertConfiguredObject(configuredObject);
        }

    }
View Full Code Here

    public void bindQueue(Binding binding)
            throws AMQStoreException
    {
        if (_stateManager.isInState(State.ACTIVE))
        {
            ConfiguredObjectRecord configuredObject = _configuredObjectHelper.createBindingConfiguredObject(binding);
            insertConfiguredObject(configuredObject);
        }
    }
View Full Code Here

    {
        _logger.debug("public void createQueue(AMQQueue queue = " + queue + "): called");

        if (_stateManager.isInState(State.ACTIVE))
        {
            ConfiguredObjectRecord queueConfiguredObject = _configuredObjectHelper.createQueueConfiguredObject(queue, arguments);
            insertConfiguredObject(queueConfiguredObject);
        }
    }
View Full Code Here

    @Override
    public void updateQueue(final AMQQueue queue) throws AMQStoreException
    {
        if (_stateManager.isInState(State.ACTIVE))
        {
            ConfiguredObjectRecord queueConfiguredObject = loadConfiguredObject(queue.getId());
            if (queueConfiguredObject != null)
            {
                ConfiguredObjectRecord newQueueRecord = _configuredObjectHelper.updateQueueConfiguredObject(queue, queueConfiguredObject);
                updateConfiguredObject(newQueueRecord);
            }
        }

    }
View Full Code Here

        }
    }

    private ConfiguredObjectRecord loadConfiguredObject(final UUID id) throws AMQStoreException
    {
        ConfiguredObjectRecord result = null;
        try
        {
            Connection conn = newAutoCommitConnection();
            try
            {
                PreparedStatement stmt = conn.prepareStatement(FIND_CONFIGURED_OBJECT);
                try
                {
                    stmt.setString(1, id.toString());
                    ResultSet rs = stmt.executeQuery();
                    try
                    {
                        if (rs.next())
                        {
                            String type = rs.getString(1);
                            Blob blob = rs.getBlob(2);
                            String attributes = null;
                            if (blob != null)
                            {
                                attributes = blobToString(blob);
                            }
                            result = new ConfiguredObjectRecord(id, type, attributes);
                        }
                    }
                    finally
                    {
                        rs.close();
View Full Code Here

                    while (rs.next())
                    {
                        String id = rs.getString(1);
                        String objectType = rs.getString(2);
                        String attributes = blobToString(rs.getBlob(3));
                        results.add(new ConfiguredObjectRecord(UUID.fromString(id), objectType, attributes));
                    }
                }
                finally
                {
                    rs.close();
View Full Code Here

    @Override
    public void createExchange(Exchange exchange) throws AMQStoreException
    {
        if (_stateManager.isInState(State.ACTIVE))
        {
            ConfiguredObjectRecord configuredObject = _configuredObjectHelper.createExchangeConfiguredObject(exchange);
            insertConfiguredObject(configuredObject);
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.store.ConfiguredObjectRecord

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.