public abstract class LogFetcher extends LogBuffer implements Closeable
LogBuffer.
LogFetcher fetcher = new SomeLogFetcher();
...
while (fetcher.fetch())
{
LogEvent event;
do
{
event = decoder.decode(fetcher, context);
// process log event.
}
while (event != null);
}
// no more binlog.
fetcher.close();
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
BIN_LOG_HEADER_SIZE
Binlog file header size
|
static float |
DEFAULT_GROWTH_FACTOR
Default growth factor.
|
static int |
DEFAULT_INITIAL_CAPACITY
Default initial capacity.
|
protected float |
factor |
BIGINT_MAX_VALUE, buffer, DIG_BASE, DIG_MAX, DIG_PER_DEC1, DIG_PER_INT32, dig2bytes, ISO_8859_1, limit, NULL_LENGTH, origin, position, powers10, SIZE_OF_INT32| 构造器和说明 |
|---|
LogFetcher() |
LogFetcher(int initialCapacity) |
LogFetcher(int initialCapacity,
float growthFactor) |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract void |
close() |
protected void |
ensureCapacity(int minCapacity)
Increases the capacity of this LogFetcher instance, if
necessary, to ensure that it can hold at least the number of elements
specified by the minimum capacity argument.
|
abstract boolean |
fetch()
Fetches the next frame of binary-log, and fill it in buffer.
|
capacity, consume, duplicate, duplicate, duplicate, fillBitmap, fillBitmap, fillBytes, fillBytes, fillOutput, fillOutput, forward, getBeInt16, getBeInt16, getBeInt24, getBeInt24, getBeInt32, getBeInt32, getBeLong48, getBeLong48, getBeLong64, getBeLong64, getBeUint16, getBeUint16, getBeUint24, getBeUint24, getBeUint32, getBeUint32, getBeUlong40, getBeUlong40, getBeUlong48, getBeUlong48, getBeUlong56, getBeUlong56, getBeUlong64, getBeUlong64, getBitmap, getBitmap, getData, getData, getData, getDecimal, getDecimal, getDouble64, getDouble64, getFixString, getFixString, getFixString, getFixString, getFloat32, getFloat32, getFullString, getFullString, getInt16, getInt16, getInt24, getInt24, getInt32, getInt32, getInt8, getInt8, getLong48, getLong48, getLong64, getLong64, getPackedLong, getPackedLong, getString, getString, getString, getString, getUint16, getUint16, getUint24, getUint24, getUint32, getUint32, getUint8, getUint8, getUlong40, getUlong40, getUlong48, getUlong48, getUlong56, getUlong56, getUlong64, getUlong64, hasRemaining, hexdump, hexdump, limit, limit, position, position, remaining, rewindpublic static final int DEFAULT_INITIAL_CAPACITY
public static final float DEFAULT_GROWTH_FACTOR
public static final int BIN_LOG_HEADER_SIZE
protected final float factor
public LogFetcher()
public LogFetcher(int initialCapacity)
public LogFetcher(int initialCapacity,
float growthFactor)
protected final void ensureCapacity(int minCapacity)
minCapacity - the desired minimum capacitypublic abstract boolean fetch()
throws IOException
IOExceptionpublic abstract void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCloseable.close()Copyright © 2017. All rights reserved.