Class ProtoLock
java.lang.Object
org.infinispan.protostream.descriptors.ProtoLock
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckCompatibility(ProtoLock that, boolean strict) Checks for compatibility between all the descriptors in this ProtoLock instance against those in the supplied oneprivate static StringescapePath(String path) static ProtoLockstatic ProtoLockreadLockFile(InputStream is, Configuration configuration) private static Map<String, Descriptor.Builder> readMessages(com.fasterxml.jackson.databind.JsonNode json, String namePrefix) private static voidreadOptions(com.fasterxml.jackson.databind.JsonNode json, OptionContainer<?> container) private static StringunescapePath(String escaped) private static voidwriteEnum(com.fasterxml.jackson.core.JsonGenerator j, EnumDescriptor ed) private static voidwriteField(com.fasterxml.jackson.core.JsonGenerator j, FieldDescriptor f, String parent) voidWrite a proto.lock fileprivate static voidwriteMessage(com.fasterxml.jackson.core.JsonGenerator j, Descriptor md) private static voidwriteMessageEnums(com.fasterxml.jackson.core.JsonGenerator j, List<Descriptor> mds) private static voidwriteOptions(com.fasterxml.jackson.core.JsonGenerator j, List<Option> options) private static voidwriteReserved(com.fasterxml.jackson.core.JsonGenerator j, ReservableDescriptor reservable)
-
Field Details
-
descriptors
-
-
Constructor Details
-
ProtoLock
-
-
Method Details
-
descriptors
-
checkCompatibility
Checks for compatibility between all the descriptors in this ProtoLock instance against those in the supplied one- Parameters:
that-strict-
-
readLockFile
- Throws:
IOException
-
readLockFile
public static ProtoLock readLockFile(InputStream is, Configuration configuration) throws IOException - Throws:
IOException
-
readMessages
private static Map<String, Descriptor.Builder> readMessages(com.fasterxml.jackson.databind.JsonNode json, String namePrefix) -
readOptions
private static void readOptions(com.fasterxml.jackson.databind.JsonNode json, OptionContainer<?> container) -
writeLockFile
Write a proto.lock file- Parameters:
os- theOutputStreamto write to- Throws:
IOException
-
writeMessageEnums
private static void writeMessageEnums(com.fasterxml.jackson.core.JsonGenerator j, List<Descriptor> mds) throws IOException - Throws:
IOException
-
writeMessage
private static void writeMessage(com.fasterxml.jackson.core.JsonGenerator j, Descriptor md) throws IOException - Throws:
IOException
-
writeEnum
private static void writeEnum(com.fasterxml.jackson.core.JsonGenerator j, EnumDescriptor ed) throws IOException - Throws:
IOException
-
writeReserved
private static void writeReserved(com.fasterxml.jackson.core.JsonGenerator j, ReservableDescriptor reservable) throws IOException - Throws:
IOException
-
writeField
private static void writeField(com.fasterxml.jackson.core.JsonGenerator j, FieldDescriptor f, String parent) throws IOException - Throws:
IOException
-
writeOptions
private static void writeOptions(com.fasterxml.jackson.core.JsonGenerator j, List<Option> options) throws IOException - Throws:
IOException
-
escapePath
-
unescapePath
-