public class TranslogStreams extends Object
Modifier and Type | Field and Description |
---|---|
static TranslogStream |
CHECKSUMMED_TRANSLOG_STREAM
V1, header, with per-op checksums
|
static TranslogStream |
LATEST |
static TranslogStream |
LEGACY_TRANSLOG_STREAM
V0, no header, no checksums
|
static String |
TRANSLOG_CODEC |
Constructor and Description |
---|
TranslogStreams() |
Modifier and Type | Method and Description |
---|---|
static Translog.Operation |
readTranslogOperation(StreamInput in)
Read the next
Translog.Operation from the stream using the
latest translog version |
static TranslogStream |
translogStreamFor(File translogFile)
Given a file, return a VersionedTranslogStream based on an
optionally-existing header in the file.
|
static void |
writeTranslogOperation(StreamOutput out,
Translog.Operation op)
Write the
Translog.Operation to the output stream using the
latest translog version |
public static TranslogStream LEGACY_TRANSLOG_STREAM
public static TranslogStream CHECKSUMMED_TRANSLOG_STREAM
public static TranslogStream LATEST
public static final String TRANSLOG_CODEC
public static Translog.Operation readTranslogOperation(StreamInput in) throws IOException
Translog.Operation
from the stream using the
latest translog versionIOException
public static void writeTranslogOperation(StreamOutput out, Translog.Operation op) throws IOException
Translog.Operation
to the output stream using the
latest translog versionIOException
public static TranslogStream translogStreamFor(File translogFile) throws IOException
IOException
Copyright © 2009–2015. All rights reserved.