
public class DataSourceLevelDbImpl extends Object implements DataSource, Database
| Constructor and Description |
|---|
DataSourceLevelDbImpl() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
bytesFrom(Serializable object) |
void |
commit(org.iq80.leveldb.WriteBatch batch) |
org.iq80.leveldb.WriteBatch |
createWriteBatch() |
void |
delete(String key) |
<T> Collection<T> |
findAllByPrefix(String prefix) |
<T> Optional<T> |
get(String key) |
void |
init() |
void |
put(String key,
Serializable value) |
void |
stop() |
public DataSourceLevelDbImpl()
@PostConstruct public void init()
@PreDestroy public void stop()
public <T> Optional<T> get(String key) throws IOException, ClassNotFoundException
get in interface DataSourceIOExceptionClassNotFoundExceptionpublic <T> Collection<T> findAllByPrefix(String prefix) throws IOException, ClassNotFoundException
findAllByPrefix in interface DataSourceIOExceptionClassNotFoundExceptionpublic void delete(String key)
delete in interface DataSourcepublic org.iq80.leveldb.WriteBatch createWriteBatch()
createWriteBatch in interface DataSourcepublic void commit(org.iq80.leveldb.WriteBatch batch)
commit in interface DataSourcepublic void put(String key, Serializable value) throws IOException
put in interface DataSourceIOExceptionpublic static byte[] bytesFrom(Serializable object) throws IOException
IOExceptionCopyright © 2015 Maxim Yunusov. All rights reserved.