Class LuaResponseWriter
java.lang.Object
org.infinispan.server.resp.serialization.lua.LuaResponseWriter
- All Implemented Interfaces:
- ResponseWriter
- 
Field SummaryFields inherited from interface org.infinispan.server.resp.serialization.ResponseWriterARRAY_BULK_STRING, ARRAY_DOUBLE, ARRAY_INTEGER, ARRAY_STRING, BULK_STRING, BULK_STRING_BYTES, CUSTOM, DOUBLE, INTEGER, MAP_BULK_STRING_KV, OK, SET_BULK_STRING, SIMPLE_STRING, UNKNOWN
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidarray(Collection<?> collection, Resp3Type contentType) Serializes a collection in the array format with elements of a specified type.<T> voidarray(Collection<T> collection, JavaObjectSerializer<T> serializer) Serializes the collection by delegating the serialization of the elements to the provided serializer.voidSerializes a collection in the array format.voidarrayEnd()Finish writing an arrayvoidStart writing a new array elementvoidarrayStart(int size) Start writing an arrayvoidbooleans(boolean value) Serializes a boolean value in the RESP3 format.voidSerializes a double-precision floating point into the doubles format.voidemptySet()Serializes a setvoiderror(CharSequence value) Serializes an error message.voidSerializes the exception message in the RESP3 error format.voidSerializes a 64-bit number in the integer format.booleanvoidSerializes a map.voidSerializes a map with key and values of the same specified type.voidSerializes a map in the RESP3 map format with keys and values of a specified format.voidmap(Map<?, ?> map, SerializationHint.KeyValueHint keyValueHint) voidnulls()Writes the null value.voidok()Serializes a simple string with the"OK"content.voidSerializes a simple string with the"QUEUED"content.voidGeneric method to serialize an object of unknown type.<T> voidset(Set<?> set, JavaObjectSerializer<T> serializer) voidSerializes a set with elements of a specified type.voidsimpleString(CharSequence value) Serializes a char sequence in a simple string format.voidstring(byte[] value) Serializes the binary blob in a bulk string format.voidstring(CharSequence value) Serializes a char sequence in a bulk string format.version()voidversion(RespVersion version) <T> voidwrite(JavaObjectSerializer<T> serializer) Invokes the callback to write a response with the serializer.<T> voidwrite(T object, JavaObjectSerializer<T> serializer) Writes an object utilizing the specific serializer.voidwriteNumericPrefix(byte symbol, long number) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.server.resp.serialization.ResponseWritercustomError, indexOutOfRange, minOrMaxNotAValidFloat, minOrMaxNotAValidStringRange, mustBePositive, mustBePositive, nanOrInfinity, noSuchKey, syntaxError, transactionAborted, unauthorized, unknownCommand, valueNotAValidFloat, valueNotInteger, wrongArgumentCount, wrongArgumentNumber, wrongType
- 
Constructor Details- 
LuaResponseWriterpublic LuaResponseWriter(party.iroiro.luajava.Lua lua) 
 
- 
- 
Method Details- 
version- Specified by:
- versionin interface- ResponseWriter
 
- 
version- Specified by:
- versionin interface- ResponseWriter
 
- 
isInternalpublic boolean isInternal()- Specified by:
- isInternalin interface- ResponseWriter
 
- 
nullspublic void nulls()Description copied from interface:ResponseWriterWrites the null value.- Specified by:
- nullsin interface- ResponseWriter
 
- 
okpublic void ok()Description copied from interface:ResponseWriterSerializes a simple string with the"OK"content.- Specified by:
- okin interface- ResponseWriter
 
- 
queuedDescription copied from interface:ResponseWriterSerializes a simple string with the"QUEUED"content.- Specified by:
- queuedin interface- ResponseWriter
- Parameters:
- ignore- Content to ignore.
 
- 
simpleStringDescription copied from interface:ResponseWriterSerializes a char sequence in a simple string format.- Specified by:
- simpleStringin interface- ResponseWriter
- Parameters:
- value- The ASCII string to serialize.
 
- 
stringDescription copied from interface:ResponseWriterSerializes a char sequence in a bulk string format.- Specified by:
- stringin interface- ResponseWriter
- Parameters:
- value- The string to serialize.
 
- 
stringpublic void string(byte[] value) Description copied from interface:ResponseWriterSerializes the binary blob in a bulk string format.- Specified by:
- stringin interface- ResponseWriter
- Parameters:
- value- The binary blob to serialize.
 
- 
integersDescription copied from interface:ResponseWriterSerializes a 64-bit number in the integer format.- Specified by:
- integersin interface- ResponseWriter
- Parameters:
- value- Number to serialize.
 
- 
doublesDescription copied from interface:ResponseWriterSerializes a double-precision floating point into the doubles format.- Specified by:
- doublesin interface- ResponseWriter
- Parameters:
- value- The floating point to serialize.
 
- 
booleanspublic void booleans(boolean value) Description copied from interface:ResponseWriterSerializes a boolean value in the RESP3 format.- Specified by:
- booleansin interface- ResponseWriter
- Parameters:
- value- Boolean value to serialize.
 
- 
arrayEmptypublic void arrayEmpty()Description copied from interface:ResponseWriterSerializes a collection in the array format.- Specified by:
- arrayEmptyin interface- ResponseWriter
 
- 
arrayDescription copied from interface:ResponseWriterSerializes the collection by delegating the serialization of the elements to the provided serializer.- Specified by:
- arrayin interface- ResponseWriter
- Type Parameters:
- T- The type of the elements in the collection and the serializer handles.
- Parameters:
- collection- Collection of elements to serialize.
- serializer- Serializer for a single element in the collection.
 
- 
arrayDescription copied from interface:ResponseWriterSerializes a collection in the array format with elements of a specified type.- Specified by:
- arrayin interface- ResponseWriter
- Parameters:
- collection- Collection of heterogeneous values to serialize.
- contentType- The type of elements contained by the sequence.
 
- 
emptySetpublic void emptySet()Description copied from interface:ResponseWriterSerializes a set- Specified by:
- emptySetin interface- ResponseWriter
 
- 
setDescription copied from interface:ResponseWriterSerializes a set with elements of a specified type.- Specified by:
- setin interface- ResponseWriter
- Parameters:
- set- Set of heterogeneous values to serialize.
- contentType- The type of elements contained by the set.
 
- 
set- Specified by:
- setin interface- ResponseWriter
 
- 
mapDescription copied from interface:ResponseWriterSerializes a map.- Specified by:
- mapin interface- ResponseWriter
- Parameters:
- map- A map with heterogeneous key-value tuples to serialize.
 
- 
mapDescription copied from interface:ResponseWriterSerializes a map with key and values of the same specified type.- Specified by:
- mapin interface- ResponseWriter
- Parameters:
- map- A map with heterogeneous key-value tuples to serialize.
- contentType- The type of key and value elements.
 
- 
mapDescription copied from interface:ResponseWriterSerializes a map in the RESP3 map format with keys and values of a specified format.- Specified by:
- mapin interface- ResponseWriter
- Parameters:
- map- A map with heterogeneous key-value tuples to serialize.
- keyType- The type of keys in the map.
- valueType- The type of values in the map.
 
- 
map- Specified by:
- mapin interface- ResponseWriter
 
- 
errorDescription copied from interface:ResponseWriterSerializes an error message.The first character in the error message must be the '-'symbol.- Specified by:
- errorin interface- ResponseWriter
- Parameters:
- value- An ASCII char sequence with the error message.
 
- 
errorDescription copied from interface:ResponseWriterSerializes the exception message in the RESP3 error format.- Specified by:
- errorin interface- ResponseWriter
- Parameters:
- t- The throwable to serialize.
 
- 
writeDescription copied from interface:ResponseWriterWrites an object utilizing the specific serializer.Implementors do not need to check for nullability in the implementation. Null response values are handled by native RESP3 serializers before passing the serialization ahead. - Specified by:
- writein interface- ResponseWriter
- Type Parameters:
- T- The type of the object.
- Parameters:
- object- The element to serialize.
- serializer- The serializer to utilize.
 
- 
writeDescription copied from interface:ResponseWriterInvokes the callback to write a response with the serializer.- Specified by:
- writein interface- ResponseWriter
- Parameters:
- serializer- Serializer to write.
 
- 
serializeDescription copied from interface:ResponseWriterGeneric method to serialize an object of unknown type.This method searches all serializers available in the registry. - Specified by:
- serializein interface- ResponseWriter
- Parameters:
- object- The object to serialize in RESP3 format.
 
- 
writeNumericPrefixpublic void writeNumericPrefix(byte symbol, long number) - Specified by:
- writeNumericPrefixin interface- ResponseWriter
 
- 
arrayStartpublic void arrayStart(int size) Description copied from interface:ResponseWriterStart writing an array- Specified by:
- arrayStartin interface- ResponseWriter
- Parameters:
- size- the number of elements
 
- 
arrayEndpublic void arrayEnd()Description copied from interface:ResponseWriterFinish writing an array- Specified by:
- arrayEndin interface- ResponseWriter
 
- 
arrayNextpublic void arrayNext()Description copied from interface:ResponseWriterStart writing a new array element- Specified by:
- arrayNextin interface- ResponseWriter
 
 
-