Package org.apache.qpid.server.store

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


                            queuesToDiscard.add(queueName);
                            messagesToDiscard.add(messageId);
                        }
                        else
                        {
                            throw new StoreException("Unable is aborted!");
                        }
                    }
                }

                if (!messagesToDiscard.contains(messageId))
View Full Code Here


            IntegerBinding.intToEntry(DEFAULT_CONFIG_VERSION, value);
            ByteBinding.byteToEntry((byte) 0, key);
            OperationStatus status = versionDb.put(null, key, value);
            if (status != OperationStatus.SUCCESS)
            {
                throw new StoreException("Error initialising config version: " + status);
            }
        }

        versionDb.close();
View Full Code Here

            }

            int version = getSourceVersion(versionDb);
            if(version > AbstractBDBMessageStore.VERSION)
            {
                throw new StoreException("Database version " + version
                                            + " is higher than the most recent known version: "
                                            + AbstractBDBMessageStore.VERSION);
            }
            performUpgradeFromVersion(version, versionDb);
        }
View Full Code Here

            StoreUpgrade upgrade = ctr.newInstance();
            upgrade.performUpgrade(_environment, UpgradeInteractionHandler.DEFAULT_HANDLER, _virtualHostName);
        }
        catch (ClassNotFoundException e)
        {
            throw new StoreException("Unable to upgrade BDB data store from version " + fromVersion + " to version"
                                        + toVersion, e);
        }
        catch (NoSuchMethodException e)
        {
            throw new StoreException("Unable to upgrade BDB data store from version " + fromVersion + " to version"
                                        + toVersion, e);
        }
        catch (InvocationTargetException e)
        {
            throw new StoreException("Unable to upgrade BDB data store from version " + fromVersion + " to version"
                                        + toVersion, e);
        }
        catch (InstantiationException e)
        {
            throw new StoreException("Unable to upgrade BDB data store from version " + fromVersion + " to version"
                                        + toVersion, e);
        }
        catch (IllegalAccessException e)
        {
            throw new StoreException("Unable to upgrade BDB data store from version " + fromVersion + " to version"
                                        + toVersion, e);
        }
    }
View Full Code Here

        if(overwrite && _storeFile.exists())
        {
            if(!_storeFile.delete())
            {
                throw new StoreException("Unable to overwrite existing configuration store file as requested: " + storeLocation);
            }
        }

        if ((!_storeFile.exists() || _storeFile.length() == 0))
        {
View Full Code Here

                    LongBinding.longToEntry(messageId, key);
                    oldMetadataDatabase.delete(txn, key);
                    return;
                case ABORT:
                    _logger.error(message);
                    throw new StoreException("Unable to upgrade message " + messageId);
                }

            }
            byte[] data = new byte[consolidatedData.length + entry.getValue().length];
            System.arraycopy(consolidatedData, 0, data, 0, consolidatedData.length);
View Full Code Here

    private void put(final Database database, Transaction txn, DatabaseEntry key, DatabaseEntry value)
    {
        OperationStatus status = database.put(txn, key, value);
        if (status != OperationStatus.SUCCESS)
        {
            throw new StoreException("Cannot add record into " + database.getDatabaseName() + ":" + status);
        }
    }
View Full Code Here

            IntegerBinding.intToEntry(DEFAULT_CONFIG_VERSION, value);
            ByteBinding.byteToEntry((byte) 0, key);
            OperationStatus status = versionDb.put(null, key, value);
            if (status != OperationStatus.SUCCESS)
            {
                throw new StoreException("Error initialising config version: " + status);
            }
        }

        versionDb.close();
View Full Code Here

                LOGGER.debug("Source message store version is " + version);
            }

            if(version > BDBConfigurationStore.VERSION)
            {
                throw new StoreException("Database version " + version
                                            + " is higher than the most recent known version: "
                                            + BDBConfigurationStore.VERSION);
            }
            performUpgradeFromVersion(version, versionDb);
        }
View Full Code Here

            StoreUpgrade upgrade = ctr.newInstance();
            upgrade.performUpgrade(_environment, UpgradeInteractionHandler.DEFAULT_HANDLER, _parent);
        }
        catch (ClassNotFoundException e)
        {
            throw new StoreException("Unable to upgrade BDB data store from version " + fromVersion + " to version"
                                        + toVersion, e);
        }
        catch (NoSuchMethodException e)
        {
            throw new StoreException("Unable to upgrade BDB data store from version " + fromVersion + " to version"
                                        + toVersion, e);
        }
        catch (InvocationTargetException e)
        {
            throw new StoreException("Unable to upgrade BDB data store from version " + fromVersion + " to version"
                                        + toVersion, e);
        }
        catch (InstantiationException e)
        {
            throw new StoreException("Unable to upgrade BDB data store from version " + fromVersion + " to version"
                                        + toVersion, e);
        }
        catch (IllegalAccessException e)
        {
            throw new StoreException("Unable to upgrade BDB data store from version " + fromVersion + " to version"
                                        + toVersion, e);
        }
    }
View Full Code Here

TOP

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

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.