
org.jsimpledb.kv.rocksdb.RocksDBUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsimpledb-kv-rocksdb Show documentation
Show all versions of jsimpledb-kv-rocksdb Show documentation
JSimpleDB key/value store implementation based on RocksDB.
The newest version!
/*
* Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
*/
package org.jsimpledb.kv.rocksdb;
import com.google.common.base.Preconditions;
import org.rocksdb.RocksObject;
/**
* Utility methods for use with RocksDB.
*/
public final class RocksDBUtil {
private RocksDBUtil() {
}
/**
* Determine whether the given {@link RocksObject} is still valid, i.e., has not been deposed.
*
* @param obj object to check
* @return true if {@code obj} is still valid
* @throws IllegalArgumentException if {@code obj} is null
*/
public static boolean isInitialized(RocksObject obj) {
Preconditions.checkArgument(obj != null, "null obj");
return obj.isOwningHandle();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy