com.fasterxml.storemate.backend.leveldb.LevelDBUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of storemate-backend-leveldb Show documentation
Show all versions of storemate-backend-leveldb Show documentation
Physical store backend using Java version of LevelDB
package com.fasterxml.storemate.backend.leveldb;
import java.io.IOException;
import org.iq80.leveldb.DBException;
import com.fasterxml.storemate.shared.StorableKey;
import com.fasterxml.storemate.store.StoreException;
public class LevelDBUtil
{
public static T convertDBE(StorableKey key, DBException dbException)
throws StoreException
{
// any special types that require special handling... ?
/*
if (dbException instanceof LockTimeoutException) {
throw new StoreException.ServerTimeout(key, dbException);
}
*/
throw new StoreException.DB(key, StoreException.DBProblem.OTHER, dbException);
}
public static T convertIOE(StorableKey key, IOException ioe)
throws StoreException
{
// any special types that require special handling... ?
throw new StoreException.Internal(key, ioe);
}
}