Package kyotocabinet

Examples of kyotocabinet.Error.message()


  logger.debug("Using kyoto path {}", kyotoPath);
        if (!db.open(kyotoPath, DB.OWRITER | DB.OCREATE)) {
            // error occurred while opening, throw error
      Error error = db.error();
            db = null;
            throw new DataStoreFatalException("Unable to open " + toString() + " @ " + path + " {code=" + error.code() + ", message=" + error.message() + "}");
        }

        if (this.synchronizeInterval < 0) {
            logger.debug("Automatic sync disabled {synchronizeInterval < 0} for " + toString());
        } else if (this.synchronizeInterval == 0) {
View Full Code Here


            if (db != null) {
                if (!db.close()) {
                    // error occurred while opening, throw error
        Error error = db.error();
                    throw new DataStoreFatalException("Unable to properly close DataStore {code=" + error.code() + ", message=" + error.message() + "}");
                }
            }
        } finally {
            db = null;
        }
View Full Code Here

      Error error = db.error();
            // this code may be 0 if the value was replaced
            if (error.code() == Error.DUPREC) {
                // value replaced, ignoring
            } else {
                throw new DataStoreFatalException("Unable to set value and key [0x" + HexUtil.toHexString(key) + "] [code=" + error.code() + ", message=" + error.message() + "]");
            }
        }
  Error error = db.error();
  if (error != null && error.code() != 0) logger.trace("Error on set {}=>{} {} {}", HexUtil.toHexString(key), value.length, error.code(), error);
View Full Code Here

                // value deleted, ignoring error code
            } else if (error.code() == Error.NOREC) {
                //[code=22, message=no record found]
                throw new RecordNotFoundException("The record for key [0x" + HexUtil.toHexString(key) + "] was not found");
            } else {
                throw new DataStoreFatalException("Unable to delete record with key [0x" + HexUtil.toHexString(key) + "] [code=" + error.code() + ", message=" + error.message() + "]");
            }
        }
  Error error = db.error();
  if (error != null && error.code() != 0) logger.trace("Error on remove {} {} {}", HexUtil.toHexString(key), error.code(), error);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.