com.github.ddth.commons.rocksdb.RocksDbException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ddth-commons-core Show documentation
Show all versions of ddth-commons-core Show documentation
DDTH's Java Common Libraries and Utilities
package com.github.ddth.commons.rocksdb;
/**
* Custom exception for RocksDb operations.
*
* @author Thanh Nguyen
* @since 0.8.0
*/
public class RocksDbException extends RuntimeException {
private static final long serialVersionUID = "0.8.0".hashCode();
public RocksDbException() {
}
public RocksDbException(String message) {
super(message);
}
public RocksDbException(Throwable cause) {
super(cause);
}
public RocksDbException(String message, Throwable cause) {
super(message, cause);
}
public RocksDbException(String message, Throwable cause, boolean enableSuppression,
boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
/*----------------------------------------------------------------------*/
/**
* Thrown to indicate the specified column family does not exist.
*
* @author Thanh Nguyen
*/
public static class ColumnFamilyNotExists extends RocksDbException {
private static final long serialVersionUID = "0.8.0".hashCode();
public ColumnFamilyNotExists() {
super("The specified column family does not exist!");
}
public ColumnFamilyNotExists(String cfName) {
super("Column family [" + cfName + "] does not exist!");
}
}
/*----------------------------------------------------------------------*/
/**
* Thrown to indicate the write/delete operation is not permitted because
* the DB is opened in read-only mode.
*
* @author Thanh Nguyen
*/
public static class ReadOnlyException extends RocksDbException {
private static final long serialVersionUID = "0.8.0".hashCode();
public ReadOnlyException() {
super("Modification operation is not permitted in read-only mode!");
}
public ReadOnlyException(String operation) {
super("Modification operation [" + operation + "] is not permitted in read-only mode!");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy