Package org.yamcs.yarch.rocksdb
Class RdbSequence
java.lang.Object
org.yamcs.yarch.rocksdb.RdbSequence
- All Implemented Interfaces:
Sequence
sequence stored in the Rocksdb metadata.
The sequence will "cache" some numbers such that it does not have to update the database after each increment. If the system crashes, the numbers cached will be lost.
-
Constructor Summary
ConstructorDescriptionRdbSequence
(String name, YRDB rdb, org.rocksdb.ColumnFamilyHandle cfMetadata) -
Method Summary
-
Constructor Details
-
RdbSequence
public RdbSequence(String name, YRDB rdb, org.rocksdb.ColumnFamilyHandle cfMetadata) throws org.rocksdb.RocksDBException, YarchException - Throws:
org.rocksdb.RocksDBException
YarchException
-
-
Method Details
-
next
- Specified by:
next
in interfaceSequence
- Throws:
YarchException
-
close
- Throws:
YarchException
-
reset
public void reset(long value) -
get
public long get()Return the current sequence value -
getName
-
getDbKey
-
getValue
public static long getValue(byte[] value)
-