Class BinlogHelper.FactoryImpl
java.lang.Object
io.grpc.protobuf.services.BinlogHelper.FactoryImpl
- All Implemented Interfaces:
BinlogHelper.Factory
- Enclosing class:
BinlogHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BinlogHelperprivate final Map<String, BinlogHelper> private final Map<String, BinlogHelper> -
Constructor Summary
ConstructorsConstructorDescriptionFactoryImpl(BinaryLogSink sink, String configurationString) Accepts a string in the format specified by the binary log spec. -
Method Summary
Modifier and TypeMethodDescription(package private) static StringReturnss, after verifying it contains only digits.(package private) static BinlogHelpercreateBinaryLog(BinaryLogSink sink, String logConfig) Returns a binlog with the correct header and message limits ornullif the input is malformed.Accepts a full method name and returns the log that should be used.(package private) static booleanisServiceGlob(String input) Returns true if the input string is a glob of the form:<package-service>/*.(package private) static intParses the optional int of the form "" (max int) or ":123" (123).
-
Field Details
-
globalLog
-
perServiceLogs
-
perMethodLogs
-
blacklistedMethods
-
-
Constructor Details
-
FactoryImpl
FactoryImpl(BinaryLogSink sink, String configurationString) Accepts a string in the format specified by the binary log spec.
-
-
Method Details
-
getLog
Accepts a full method name and returns the log that should be used.- Specified by:
getLogin interfaceBinlogHelper.Factory
-
createBinaryLog
Returns a binlog with the correct header and message limits ornullif the input is malformed. The input should be a string that is in one of these forms:{h(:\d+)?}, {m(:\d+)?}, {h(:\d+)?,m(:\d+)?}If the
logConfigis null, the returned binlog will have a limit of Integer.MAX_VALUE. -
checkDigits
-
optionalInt
Parses the optional int of the form "" (max int) or ":123" (123). -
isServiceGlob
Returns true if the input string is a glob of the form:<package-service>/*.
-