이 콘텐츠는 선택한 언어로 제공되지 않습니다.
6.2. Protobuf Encoding
The Infinispan Query DSL can be used remotely via the Hot Rod client. In order to do this, protocol buffers are used to adopt a common format for storing cache entries and marshalling them.
For more information, see https://developers.google.com/protocol-buffers/docs/overview
6.2.1. Storing Protobuf Encoded Entities 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Protobuf requires data to be structured. This is achieved by declaring Protocol Buffer message types in
.proto files
For example:
Example 6.1. .library.proto
The provided example:
- An entity named
Bookis placed in a package namedbook_sample.package book_sample; message Book {package book_sample; message Book {Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The entity declares several fields of primitive types and a repeatable field named
authors.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The
Authormessage instances are embedded in theBookmessage instance.message Author { required string name = 1; required string surname = 2; }message Author { required string name = 1; required string surname = 2; }Copy to Clipboard Copied! Toggle word wrap Toggle overflow