public class JournalSegment<E> extends Object implements AutoCloseable
| Constructor and Description |
|---|
JournalSegment(JournalSegmentFile file,
JournalSegmentDescriptor descriptor,
io.atomix.utils.serializer.Serializer serializer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the segment.
|
void |
delete()
Deletes the segment.
|
JournalSegmentDescriptor |
descriptor()
Returns the segment descriptor.
|
JournalSegmentFile |
file()
Returns the segment file.
|
long |
id()
Returns the segment ID.
|
long |
index()
Returns the segment's starting index.
|
boolean |
isEmpty()
Returns a boolean value indicating whether the segment is empty.
|
boolean |
isFull()
Returns a boolean indicating whether the segment is full.
|
boolean |
isOpen()
Returns a boolean indicating whether the segment is open.
|
long |
lastIndex()
Returns the last index in the segment.
|
long |
length()
Returns the segment length.
|
long |
size()
Returns the segment size.
|
String |
toString() |
long |
version()
Returns the segment version.
|
JournalSegmentWriter<E> |
writer()
Returns the segment writer.
|
public JournalSegment(JournalSegmentFile file, JournalSegmentDescriptor descriptor, io.atomix.utils.serializer.Serializer serializer)
public long id()
public long version()
public long index()
public long lastIndex()
public JournalSegmentFile file()
public JournalSegmentDescriptor descriptor()
public long size()
public boolean isEmpty()
public boolean isFull()
public long length()
public JournalSegmentWriter<E> writer()
public boolean isOpen()
public void close()
close in interface AutoCloseablepublic void delete()
Copyright © 2013–2018. All rights reserved.