org.elasticsearch.index.translog.memory
Class MemorySnapshot
java.lang.Object
org.elasticsearch.index.translog.memory.MemorySnapshot
- All Implemented Interfaces:
- java.lang.Iterable<Translog.Operation>, Translog.Snapshot, Streamable, Releasable
public class MemorySnapshot
- extends java.lang.Object
- implements Translog.Snapshot
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemorySnapshot
public MemorySnapshot()
MemorySnapshot
public MemorySnapshot(Translog.Snapshot snapshot)
MemorySnapshot
public MemorySnapshot(long id,
Translog.Operation[] operations)
translogId
public long translogId()
- Description copied from interface:
Translog.Snapshot
- The id of the translog the snapshot was taken with.
- Specified by:
translogId
in interface Translog.Snapshot
release
public boolean release()
throws ElasticSearchException
- Specified by:
release
in interface Releasable
- Throws:
ElasticSearchException
size
public int size()
- Description copied from interface:
Translog.Snapshot
- The number of translog operations in the snapshot.
- Specified by:
size
in interface Translog.Snapshot
iterator
public java.util.Iterator<Translog.Operation> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<Translog.Operation>
skipTo
public java.lang.Iterable<Translog.Operation> skipTo(int skipTo)
- Specified by:
skipTo
in interface Translog.Snapshot
readFrom
public void readFrom(StreamInput in)
throws java.io.IOException
- Specified by:
readFrom
in interface Streamable
- Throws:
java.io.IOException
writeTo
public void writeTo(StreamOutput out)
throws java.io.IOException
- Specified by:
writeTo
in interface Streamable
- Throws:
java.io.IOException