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
ConstructorsConstructorDescriptionRdbSequence(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.RocksDBExceptionYarchException
-
-
Method Details
-
next
- Specified by:
nextin interfaceSequence- Throws:
YarchException
-
close
- Throws:
YarchException
-
reset
public void reset(long value) -
get
public long get()Return the current sequence value- Returns:
-
getName
-
getDbKey
-
getValue
public static long getValue(byte[] value)
-