public class RecordConsumerLoggingWrapper extends RecordConsumer
Constructor and Description |
---|
RecordConsumerLoggingWrapper(RecordConsumer delegate)
all calls a delegate to the wrapped delegate
|
Modifier and Type | Method and Description |
---|---|
void |
addBinary(Binary value)
add a binary value in the current field
|
void |
addBoolean(boolean value)
add a boolean value in the current field
|
void |
addDouble(double value)
add a double value in the current field
|
void |
addFloat(float value)
add a float value in the current field
|
void |
addInteger(int value)
add an int value in the current field
|
void |
addLong(long value)
add a long value in the current field
|
void |
endField(String field,
int index)
end of a field in a group or message
|
void |
endGroup()
end of a group in a field
|
void |
endMessage()
end of a record
|
void |
flush()
NoOps by default
Subclass class can implement its own flushing logic
|
void |
startField(String field,
int index)
start of a field in a group or message
if the field is repeated the field is started only once and all values added in between start and end
|
void |
startGroup()
start of a group in a field
|
void |
startMessage()
start a new record
|
public RecordConsumerLoggingWrapper(RecordConsumer delegate)
delegate
- a wrapped record consumer that does the real workpublic void startField(String field, int index)
startField
in class RecordConsumer
field
- name of the fieldindex
- of the field in the group or messagepublic void startGroup()
startGroup
in class RecordConsumer
public void addInteger(int value)
addInteger
in class RecordConsumer
value
- an int valuepublic void addLong(long value)
addLong
in class RecordConsumer
value
- a long valuepublic void addBoolean(boolean value)
addBoolean
in class RecordConsumer
value
- a boolean valuepublic void addBinary(Binary value)
addBinary
in class RecordConsumer
value
- a binary valuepublic void addFloat(float value)
addFloat
in class RecordConsumer
value
- a float valuepublic void addDouble(double value)
addDouble
in class RecordConsumer
value
- a double valuepublic void flush()
flush
in class RecordConsumer
public void endGroup()
endGroup
in class RecordConsumer
public void endField(String field, int index)
endField
in class RecordConsumer
field
- name of the fieldindex
- of the field in the group or messagepublic void startMessage()
startMessage
in class RecordConsumer
public void endMessage()
endMessage
in class RecordConsumer
Copyright © 2023 The Apache Software Foundation. All rights reserved.