Keys have a name and a binary marshaller used for serialization.
(String name, BinaryMarshaller<T> marshaller)
| 861 | |
| 862 | /** Keys have a name and a binary marshaller used for serialization. */ |
| 863 | private BinaryKey(String name, BinaryMarshaller<T> marshaller) { |
| 864 | super(name, false /* not pseudo */, marshaller); |
| 865 | checkArgument( |
| 866 | name.endsWith(BINARY_HEADER_SUFFIX), |
| 867 | "Binary header is named %s. It must end with %s", |
| 868 | name, |
| 869 | BINARY_HEADER_SUFFIX); |
| 870 | checkArgument(name.length() > BINARY_HEADER_SUFFIX.length(), "empty key name"); |
| 871 | this.marshaller = checkNotNull(marshaller, "marshaller is null"); |
| 872 | } |
| 873 | |
| 874 | @Override |
| 875 | byte[] toBytes(T value) { |
nothing calls this directly
no test coverage detected