Package com.sleepycat.db

Examples of com.sleepycat.db.OperationStatus


    /** {@inheritDoc} */
    public boolean putNoOverwrite(
  DbTransaction txn, byte[] key, byte[] value)
    {
  try {
      OperationStatus status = db.putNoOverwrite(
    BdbTransaction.getBdbTxn(txn), new DatabaseEntry(key),
    new DatabaseEntry(value));
      if (status == SUCCESS) {
    return true;
      } else if (status == KEYEXIST) {
View Full Code Here


    }

    /** {@inheritDoc} */
    public boolean delete(DbTransaction txn, byte[] key) {
  try {
      OperationStatus status = db.delete(
    BdbTransaction.getBdbTxn(txn), new DatabaseEntry(key));
      if (status == SUCCESS) {
    return true;
      } else if (status == NOTFOUND) {
    return false;
View Full Code Here

    }

    /** {@inheritDoc} */
    public boolean findFirst() {
  try {
      OperationStatus status =
    cursor.getFirst(keyEntry, valueEntry, null);
      if (status == SUCCESS) {
    isCurrent = true;
    return true;
      } else if (status == NOTFOUND) {
View Full Code Here

    }

    /** {@inheritDoc} */
    public boolean findNext() {
  try {
      OperationStatus status =
    cursor.getNext(keyEntry, valueEntry, null);
      if (status == SUCCESS) {
    isCurrent = true;
    return true;
      } else if (status == NOTFOUND) {
View Full Code Here

    /** {@inheritDoc} */
    public boolean findNext(byte[] key) {
  DatabaseEntry searchEntry = new DatabaseEntry(key);
  try {
      OperationStatus status =
    cursor.getSearchKeyRange(searchEntry, valueEntry, null);
      if (status == SUCCESS) {
    keyEntry = searchEntry;
    isCurrent = true;
    return true;
View Full Code Here

    }

    /** {@inheritDoc} */
    public boolean findLast() {
  try {
      OperationStatus status =
    cursor.getLast(keyEntry, valueEntry, null);
      if (status == SUCCESS) {
    isCurrent = true;
    return true;
      } else if (status == NOTFOUND) {
View Full Code Here

    /** {@inheritDoc} */
    public boolean putNoOverwrite(byte[] key, byte[] value) {
  try {
      DatabaseEntry putKeyEntry = new DatabaseEntry(key);
      DatabaseEntry putValueEntry = new DatabaseEntry(value);
      OperationStatus status = cursor.putNoOverwrite(
    putKeyEntry, putValueEntry);
      if (status == SUCCESS) {
    isCurrent = true;
    keyEntry = putKeyEntry;
    valueEntry = putValueEntry;
View Full Code Here

TOP

Related Classes of com.sleepycat.db.OperationStatus

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.