JBoss Data Grid HotRod C# Client  7.1.0
Public Member Functions | List of all members
Infinispan.HotRod.IMarshaller Interface Reference

Hotrod is a binary protocol so the object passed in by the user are being marshalled into a binary format using an implementation of this interface. Users can implement this interface and develop their own marshaller without using the default marshaller. More...

Inheritance diagram for Infinispan.HotRod.IMarshaller:
Infinispan.HotRod.CompatibilityMarshaller Infinispan.HotRod.IdentityMarshaller

Public Member Functions

byte[] ObjectToByteBuffer (Object obj, int estimatedSize)
 Marshalls an object to a byte array. The estimatedSize parameter is a hint that can be passed in to allow for efficient sizing of the byte array before attempting to marshall the object. The more accurate this estimate is, the less likely byte[]s will need to be resized to hold the byte stream generated by marshalling the object. More...
 
byte[] ObjectToByteBuffer (Object obj)
 Marshalls an object to a byte array. More...
 
Object ObjectFromByteBuffer (byte[] buf)
 Unmarshalls an object from a byte array. More...
 
Object ObjectFromByteBuffer (byte[] buf, int offset, int length)
 Unmarshalls an object from a specific portion of a byte array. More...
 
bool IsMarshallable (Object o)
 A method that checks whether the given object is marshallable as per the rules of this marshaller. More...
 

Detailed Description

Hotrod is a binary protocol so the object passed in by the user are being marshalled into a binary format using an implementation of this interface. Users can implement this interface and develop their own marshaller without using the default marshaller.

Member Function Documentation

bool Infinispan.HotRod.IMarshaller.IsMarshallable ( Object  o)

A method that checks whether the given object is marshallable as per the rules of this marshaller.

Parameters
oobject to verify whether it's marshallable or not
Returns
true if the object is marshallable, otherwise false
Object Infinispan.HotRod.IMarshaller.ObjectFromByteBuffer ( byte[]  buf)

Unmarshalls an object from a byte array.

Parameters
bufbyte array containing the binary representation of an object. Must not be null.
Returns
an object

Implemented in Infinispan.HotRod.CompatibilityMarshaller, and Infinispan.HotRod.IdentityMarshaller.

Object Infinispan.HotRod.IMarshaller.ObjectFromByteBuffer ( byte[]  buf,
int  offset,
int  length 
)

Unmarshalls an object from a specific portion of a byte array.

Parameters
bufbyte array containing the binary representation of an object. Must not be null.
offsetpoint in buffer to start reading
lengthnumber of bytes to consider
Returns
an object

Implemented in Infinispan.HotRod.CompatibilityMarshaller, and Infinispan.HotRod.IdentityMarshaller.

byte [] Infinispan.HotRod.IMarshaller.ObjectToByteBuffer ( Object  obj,
int  estimatedSize 
)

Marshalls an object to a byte array. The estimatedSize parameter is a hint that can be passed in to allow for efficient sizing of the byte array before attempting to marshall the object. The more accurate this estimate is, the less likely byte[]s will need to be resized to hold the byte stream generated by marshalling the object.

Parameters
objobject to convert to a byte array. Must not be null.
estimatedSizean estimate of how large the resulting byte array may be
Returns
a byte array with the marshalled form of the object
byte [] Infinispan.HotRod.IMarshaller.ObjectToByteBuffer ( Object  obj)

Marshalls an object to a byte array.

Parameters
objobject to convert to a byte array. Must not be null.
Returns
a byte array with the marshalled form of the object

The documentation for this interface was generated from the following file: