public class MapDBLog extends Object implements net.kuujo.copycat.log.Log
| Constructor and Description |
|---|
MapDBLog(String dbFileName,
org.onosproject.store.serializers.StoreSerializer serializer) |
| Modifier and Type | Method and Description |
|---|---|
List<Long> |
appendEntries(net.kuujo.copycat.log.Entry... entries) |
List<Long> |
appendEntries(List<net.kuujo.copycat.log.Entry> entries) |
long |
appendEntry(net.kuujo.copycat.log.Entry entry) |
protected void |
assertIsOpen() |
void |
close() |
void |
compact(long index,
net.kuujo.copycat.log.Entry entry) |
boolean |
containsEntry(long index) |
void |
delete() |
<T extends net.kuujo.copycat.log.Entry> |
firstEntry() |
long |
firstIndex() |
<T extends net.kuujo.copycat.log.Entry> |
getEntries(long from,
long to) |
<T extends net.kuujo.copycat.log.Entry> |
getEntry(long index) |
boolean |
isEmpty() |
boolean |
isOpen() |
<T extends net.kuujo.copycat.log.Entry> |
lastEntry() |
long |
lastIndex() |
void |
open() |
void |
removeAfter(long index) |
long |
size() |
void |
sync() |
public MapDBLog(String dbFileName, org.onosproject.store.serializers.StoreSerializer serializer)
public void open()
throws IOException
open in interface net.kuujo.copycat.log.LogIOExceptionpublic void close()
throws IOException
close in interface net.kuujo.copycat.log.LogIOExceptionpublic boolean isOpen()
isOpen in interface net.kuujo.copycat.log.Logprotected void assertIsOpen()
public long appendEntry(net.kuujo.copycat.log.Entry entry)
appendEntry in interface net.kuujo.copycat.log.Logpublic List<Long> appendEntries(net.kuujo.copycat.log.Entry... entries)
appendEntries in interface net.kuujo.copycat.log.Logpublic List<Long> appendEntries(List<net.kuujo.copycat.log.Entry> entries)
appendEntries in interface net.kuujo.copycat.log.Logpublic boolean containsEntry(long index)
containsEntry in interface net.kuujo.copycat.log.Logpublic void delete()
throws IOException
delete in interface net.kuujo.copycat.log.LogIOExceptionpublic <T extends net.kuujo.copycat.log.Entry> T firstEntry()
firstEntry in interface net.kuujo.copycat.log.Logpublic long firstIndex()
firstIndex in interface net.kuujo.copycat.log.Logpublic <T extends net.kuujo.copycat.log.Entry> List<T> getEntries(long from, long to)
getEntries in interface net.kuujo.copycat.log.Logpublic <T extends net.kuujo.copycat.log.Entry> T getEntry(long index)
getEntry in interface net.kuujo.copycat.log.Logpublic boolean isEmpty()
isEmpty in interface net.kuujo.copycat.log.Logpublic <T extends net.kuujo.copycat.log.Entry> T lastEntry()
lastEntry in interface net.kuujo.copycat.log.Logpublic long lastIndex()
lastIndex in interface net.kuujo.copycat.log.Logpublic void removeAfter(long index)
removeAfter in interface net.kuujo.copycat.log.Logpublic long size()
size in interface net.kuujo.copycat.log.Logpublic void sync()
throws IOException
sync in interface net.kuujo.copycat.log.LogIOExceptionpublic void compact(long index,
net.kuujo.copycat.log.Entry entry)
throws IOException
compact in interface net.kuujo.copycat.log.LogIOExceptionCopyright © 2014. All rights reserved.