@Override public void readMarshallable(@NotNull WireIn wire) throws IllegalStateException { wire.read(() -> "keyType").typeLiteral(this, (o, c) -> o.keyType = c) .read(() -> "valueType").typeLiteral(this, (o, c) -> o.valueType = c) .read(() -> "compression").text(this, (o, c) -> o.compression = c) .read(() -> "putReturnsNull").bool(this, (o, e) -> o.putReturnsNull = e) .read(() -> "removeReturnsNull").bool(this, (o, e) -> o.removeReturnsNull = e) .read(() -> "diskPath").text(this, (o, s) -> o.diskPath = s); }
@Override public void readMarshallable(@NotNull WireIn wire) throws IllegalStateException { wire.read(MapEventFields.assetName).text(this, (o, s) -> assetName = s); wire.read(MapEventFields.key).object(Object.class, this, (o, x) -> o.key = (K) x); wire.read(MapEventFields.oldValue).object(Object.class, this, (o, x) -> o.oldValue = (V) x); wire.read(MapEventFields.value).object(Object.class, this, (o, x) -> o.value = (V) x); wire.read(MapEventFields.isReplicationEvent).bool(this, (o, x) -> o.isReplicationEvent = x); wire.read(MapEventFields.hasValueChanged).bool(this, (o, x) -> o.hasValueChanged = x); }
@Override public void readMarshallable(@NotNull WireIn wire) throws IllegalStateException { wire.read(() -> "keyType").typeLiteral(this, (o, c) -> o.keyType = c) .read(() -> "valueType").typeLiteral(this, (o, c) -> o.valueType = c) .read(() -> "compression").text(this, (o, c) -> o.compression = c) .read(() -> "putReturnsNull").bool(this, (o, e) -> o.putReturnsNull = e) .read(() -> "removeReturnsNull").bool(this, (o, e) -> o.removeReturnsNull = e); while (!wire.isEmpty()) wire.read(() -> "import").text(this, (o, s) -> o.importFile = s); }
@Override public void readMarshallable(@NotNull WireIn wire) throws IllegalStateException { wire.read(MapEventFields.assetName).text(this, (o, s) -> assetName = s); wire.read(MapEventFields.key).object(Object.class, this, (o, x) -> o.key = (K) x); wire.read(MapEventFields.oldValue).object(Object.class, this, (o, x) -> o.oldValue = (V) x); wire.read(MapEventFields.isReplicationEvent).bool(this, (o, x) -> o.isReplicationEvent = x); }
@Override public void readMarshallable(@NotNull WireIn wire) throws IllegalStateException { assetName = wire.read(MapEventFields.assetName).text(); key = wire.read(MapEventFields.key).object((Class<K>) Object.class); value = wire.read(MapEventFields.value).object((Class<V>) Object.class); isReplicationEvent = wire.read(MapEventFields.isReplicationEvent).bool(); }
@Override public void readMarshallable(@NotNull WireIn wire) throws IllegalStateException { wire.read(() -> "spec").text(this, (o, s) -> o.spec = s) .read(() -> "name").text(this, (o, s) -> o.name = s) .read(() -> "cluster").text(this, (o, s) -> o.cluster = s) .read(() -> "maxEntries").int64(this, (o, e) -> o.maxEntries = e) .read(() -> "averageValueSize").int32(this, (o, e) -> o.averageValueSize = e) .read(() -> "putReturnsNull").bool(this, (o, b) -> o.putReturnsNull = b) .read(() -> "removeReturnsNull").bool(this, (o, b) -> o.removeReturnsNull = b); }
@Override public void readMarshallable(@NotNull WireIn wire) throws IllegalStateException { wire.read(() -> "spec").text(this, (o, s) -> o.spec = s) .read(() -> "name").text(this, (o, s) -> o.name = s) .read(() -> "valueType").typeLiteral(this, (o, t) -> o.valueType = t) .read(() -> "recurse").bool(this, (o, b) -> o.recurse = b); }
@Override public void readMarshallable(@NotNull WireIn wire) throws IllegalStateException { wire.read(() -> "diskPath").text(this, (o, c) -> o.diskPath = c) .read(() -> "keyType").typeLiteral(this, (o, c) -> o.keyType = c) .read(() -> "valueType").typeLiteral(this, (o, c) -> o.valueType = c) .read(() -> "compression").text(this, (o, c) -> o.compression = c) .read(() -> "putReturnsNull").bool(this, (o, e) -> o.putReturnsNull = e) .read(() -> "removeReturnsNull").bool(this, (o, e) -> o.removeReturnsNull = e) .read(() -> "entries").int64(this, (o, e) -> o.entries = e) .read(() -> "averageSize").float64(this, (o, e) -> o.averageSize = e); }
@NotNull public WireParser<Void> getWireParser() { @NotNull WireParser<Void> parser = new VanillaWireParser<>((s, v, $) -> { }); parser.register(() -> "cluster", (s, v, $) -> v.text(this, (o, x) -> o.cluster = x)); parser.register(() -> "view", (s, v, $) -> v.text(this, RequestContext::view)); parser.register(() -> "bootstrap", (s, v, $) -> v.bool(this, (o, x) -> o.bootstrap = x)); parser.register(() -> "putReturnsNull", (s, v, $) -> v.bool(this, (o, x) -> o.putReturnsNull = x)); parser.register(() -> "removeReturnsNull", (s, v, $) -> v.bool(this, (o, x) -> o.removeReturnsNull = x)); parser.register(() -> "nullOldValueOnUpdateEvent", (s, v, $) -> v.bool(this, (o, x) -> o.nullOldValueOnUpdateEvent = x)); // removed for security reasons, as this could allow remotely anyone to access files on the server // parser.register(() -> "basePath", (s, v, $) -> v.text(this, (o, x) -> o.basePath = x)); parser.register(() -> "viewType", (s, v, $) -> v.typeLiteral(this, (o, x) -> o.viewType = x)); parser.register(() -> "topicType", (s, v, $) -> v.typeLiteral(this, (o, x) -> o.type = x)); parser.register(() -> "keyType", (s, v, $) -> v.typeLiteral(this, (o, x) -> o.type = x)); parser.register(() -> "valueType", (s, v, $) -> v.typeLiteral(this, (o, x) -> o.type2 = x)); parser.register(() -> "messageType", (s, v, $) -> v.typeLiteral(this, (o, x) -> o.type = x)); parser.register(() -> "elementType", (s, v, $) -> v.typeLiteral(this, (o, x) -> o.type2 = x)); parser.register(() -> "endSubscriptionAfterBootstrap", (s, v, $) -> v.bool(this, (o, x) -> o.endSubscriptionAfterBootstrap = x)); parser.register(() -> "throttlePeriodMs", (s, v, $) -> v.int32(this, (o, x) -> o.throttlePeriodMs = x)); parser.register(() -> "entries", (s, v, $) -> v.int64(this, (o, x) -> o.entries = x)); parser.register(() -> "averageValueSize", (s, v, $) -> v.int64(this, (o, x) -> o.averageValueSize = x)); parser.register(() -> "dontPersist", (s, v, $) -> v.bool(this, (o, x) -> o.dontPersist = x)); parser.register(() -> "token", (s, v, $) -> v.int64(this, (o, x) -> o.token = x)); return parser; }
@Override default void readMarshallable(@NotNull WireIn wire) throws IllegalStateException { setDeleted(wire.read(() -> "deleted").bool()); setTimestamp(wire.read(() -> "timestamp").int64()); setIdentifier(wire.read(() -> "identifier").int8()); for (int i = 0; i < DIRTY_WORD_COUNT; i++) { final int finalI = i; setDirtyWordAt(i, wire.read(() -> "dirtyWord-" + finalI).int64()); } }
@Override protected void readMarshallableFields(@NotNull WireIn wireIn) { super.readMarshallableFields(wireIn); valueClass = wireIn.read(() -> "valueClass").typeLiteral(); valueSizeMarshaller = wireIn.read(() -> "valueSizeMarshaller").object(SizeMarshaller.class); valueReader = wireIn.read(() -> "valueReader").object(SizedReader.class); valueDataAccess = wireIn.read(() -> "valueDataAccess").object(DataAccess.class); constantlySizedEntry = wireIn.read(() -> "constantlySizedEntry").bool(); alignment = wireIn.read(() -> "alignment").int32(); worstAlignment = wireIn.read(() -> "worstAlignment").int32(); }
@Override public void readMarshallable(@NotNull WireIn wire) { wire.read(() -> "key").bytesSet((PointerBytesStore) key); wire.read(() -> "value").bytesSet((PointerBytesStore) value); timestamp(wire.read(() -> "timestamp").int64()); identifier(wire.read(() -> "identifier").int8()); isDeleted(wire.read(() -> "isDeleted").bool()); bootStrapTimeStamp(wire.read(() -> "bootStrapTimeStamp").int64()); }
@Override default void readMarshallable(@NotNull final WireIn wire) throws IllegalStateException { key(wire.read(() -> "key").bytesStore()); value(wire.read(() -> "value").bytesStore()); timestamp(wire.read(() -> "timestamp").int64()); identifier(wire.read(() -> "identifier").int8()); isDeleted(wire.read(() -> "isDeleted").bool()); bootStrapTimeStamp(wire.read(() -> "bootStrapTimeStamp").int64()); }
keyDataAccess = wireIn.read(() -> "keyDataAccess").object(DataAccess.class); checksumEntries = wireIn.read(() -> "checksumEntries").bool();