Package com.sleepycat.je

Examples of com.sleepycat.je.DatabaseException


    private Node fetchLSNHandleExceptions(long lsn,
                                          DatabaseEntry lnKeyEntry,
                                          LSNAccumulator pendingLSNs) {

        DatabaseException dbe = null;

        try {
            return fetchLSN(lsn, lnKeyEntry, pendingLSNs);
        } catch (FileNotFoundException e) {
            if (excPredicate == null ||
View Full Code Here


    protected void callProcessLSNHandleExceptions(long childLSN,
                                                  LogEntryType childType,
                                                  Node theNode,
                                                  byte[] lnKey) {
        DatabaseException dbe = null;

        try {
            callback.processLSN(childLSN, childType, theNode, lnKey);
        } catch (FileNotFoundException e) {
            if (excPredicate == null ||
View Full Code Here

        /*
         * A post commit exception that needs to be propagated back to the
         * caller. Its throw is delayed until the post commit cleanup has been
         * completed.
         */
        DatabaseException queuedPostCommitException = null;

        this.commitDurability = durability;

        try {

View Full Code Here

        boolean success = false;
        try {
            boolean primaryExists =
                truncateIfExists(txn, storePrefix + clsName);
            if (primaryExists) {
                DatabaseException firstException = null;
                for (SecondaryKeyMetadata keyMeta :
                     entityMeta.getSecondaryKeys().values()) {
                    /* Ignore secondaries that do not exist. */
                    removeIfExists
                        (txn,
View Full Code Here

        EntityMetadata entityMeta = checkEntityClass(clsName);

        PrimaryIndex priIndex = priIndexMap.get(clsName);
        if (priIndex != null) {
            /* Close the secondaries first. */
            DatabaseException firstException = null;
            for (SecondaryKeyMetadata keyMeta :
                 entityMeta.getSecondaryKeys().values()) {

                String secName = makeSecName(clsName, keyMeta.getKeyName());
                SecondaryIndex secIndex = secIndexMap.get(secName);
View Full Code Here

        if (catalog == null) {
            return;
        }

        DatabaseException firstException = null;
        try {
            if (rawAccess) {
                boolean allClosed = catalog.close();
                assert allClosed;
            } else {
View Full Code Here

        startup(initialElectionPolicy);
        LoggerUtils.finest(logger, repImpl, "joinGroup " +
                           nodeState.getRepEnvState());

        DatabaseException exitException = null;
        int retries=0;
        repImpl.getStartupTracker().start(Phase.BECOME_CONSISTENT);
        repImpl.getStartupTracker().setProgress
           (RecoveryProgress.BECOME_CONSISTENT);
        try {
View Full Code Here

      if(arc.length() == 0) {
        throw new ParseException("no/invalid arc",0);
      }
      String urls[] = locationDB.arcToUrls(arc);
      if(urls == null || urls.length == 0) {
        throw new DatabaseException("Unable to locate("+arc+")");
      }
      String urlString = urls[0];
      String rangeHeader = httpRequest.getHeader(RANGE_HTTP_HEADER);
      URL url = new URL(urlString);
      URLConnection conn = url.openConnection();
View Full Code Here

//environmentConfig.setReadOnly(true); TODO MC
    environmentConfig.setConfigParam("je.log.fileMax",JE_LOG_FILEMAX);
    File file = new File(path);
    if(!file.isDirectory()) {
      if(!file.mkdirs()) {
        throw new DatabaseException("failed mkdirs(" + path + ")");
      }
    }
    env = new Environment(file, environmentConfig);
    DatabaseConfig databaseConfig = new DatabaseConfig();
    databaseConfig.setAllowCreate(true);
View Full Code Here

            final OperationStatus status = this.ticketDb.put(null,
                getKeyFromString(ticket.getId()), dataEntry);

            if (status != OperationStatus.SUCCESS) {
                throw new DatabaseException("Data insertion got status "
                    + status);
            }
        } catch (final DatabaseException e) {
            throw new RuntimeException(
                "Ticket Registry DB failed to add ticket : " + ticket, e);
View Full Code Here

TOP

Related Classes of com.sleepycat.je.DatabaseException

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.