Package com.sun.sgs.service.store.db

Examples of com.sun.sgs.service.store.db.DbDatabaseException


    valueEntry = putValueEntry;
    return true;
      } else if (status == KEYEXIST) {
    return false;
      } else {
    throw new DbDatabaseException("Operation failed: " + status);
      }
  } catch (DatabaseException e) {
      throw BdbEnvironment.convertException(e, true);
  }
    }     
View Full Code Here


  config.setTransactional(true);
  config.setTxnWriteNoSync(!flushToDisk);
  try {
      env = new Environment(new File(directory), config);
  } catch (FileNotFoundException e) {
      throw new DbDatabaseException(
    "DataStore directory does not exist: " + directory);
  } catch (DatabaseException e) {
      throw convertException(e, false);
  }
  checkpointTask = new CheckpointRunnable(checkpointSize);
View Full Code Here

      Error error = new Error(
    "Database requires recovery -- need to restart: " + e, e);
      logger.logThrow(Level.SEVERE, error, "Database requires recovery");
      throw error;
  } else {
      throw new DbDatabaseException(
    "Unexpected database exception: " + e);
  }
    }
View Full Code Here

    isCurrent = true;
    return true;
      } else if (status == NOTFOUND) {
    return false;
      } else {
    throw new DbDatabaseException("Operation failed: " + status);
      }
  } catch (DatabaseException e) {
      throw JeEnvironment.convertException(e, true);
  }
    }
View Full Code Here

    isCurrent = true;
    return true;
      } else if (status == NOTFOUND) {
    return false;
      } else {
    throw new DbDatabaseException("Operation failed: " + status);
      }
  } catch (DatabaseException e) {
      throw JeEnvironment.convertException(e, true);
  }
    }
View Full Code Here

    isCurrent = true;
    return true;
      } else if (status == NOTFOUND) {
    return false;
      } else {
    throw new DbDatabaseException("Operation failed: " + status);
      }
  } catch (DatabaseException e) {
      throw JeEnvironment.convertException(e, true);
  }
    }
View Full Code Here

    isCurrent = true;
    return true;
      } else if (status == NOTFOUND) {
    return false;
      } else {
    throw new DbDatabaseException("Operation failed: " + status);
      }
  } catch (DatabaseException e) {
      throw JeEnvironment.convertException(e, true);
  }
    }
View Full Code Here

    valueEntry = putValueEntry;
    return true;
      } else if (status == KEYEXIST) {
    return false;
      } else {
    throw new DbDatabaseException("Operation failed: " + status);
      }
  } catch (DatabaseException e) {
      throw JeEnvironment.convertException(e, true);
  }
    }     
View Full Code Here

      if (status == SUCCESS) {
    return convertData(valueEntry.getData());
      } else if (status == NOTFOUND) {
    return null;
      } else {
    throw new DbDatabaseException("Operation failed: " + status);
      }
  } catch (DatabaseException e) {
      throw JeEnvironment.convertException(e, true);
  }
    }
View Full Code Here

      valueEntry.setPartial(0, 0, true);
      OperationStatus status = db.get(
    JeTransaction.getJeTxn(txn), new DatabaseEntry(key),
    valueEntry, LockMode.RMW);
      if (status != SUCCESS && status != NOTFOUND) {
    throw new DbDatabaseException("Operation failed: " + status);
      }
  } catch (DatabaseException e) {
      throw JeEnvironment.convertException(e, true);
  }
    }
View Full Code Here

TOP

Related Classes of com.sun.sgs.service.store.db.DbDatabaseException

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.