VMware Tanzu GemFire .NET Client API Reference

VMware Tanzu GemFire .NET Client: IPdxInstanceFactory Interface Reference
VMware Tanzu GemFire .NET Client
IPdxInstanceFactory Interface Reference

PdxInstanceFactory gives you a way to create PdxInstances. Call the write methods to populate the field data and then call Create to produce an actual instance that contains the data. To create a factory call ICache.CreatePdxInstanceFactory. A factory can only create a single instance. To create multiple instances create multiple factories or use IPdxInstance.CreateWriter to create subsequent instances. More...

Inherited by PdxInstanceFactory.

Public Member Functions

IPdxInstance Create ()
 Create a IPdxInstance . The instance will contain any data written to this factory using the write methods. More...
 
IPdxInstanceFactory WriteChar (string fieldName, char value)
 
Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteBoolean (string fieldName, bool value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteByte (string fieldName, byte value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteShort (string fieldName, short value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteInt (string fieldName, int value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteLong (string fieldName, long value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteFloat (string fieldName, float value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteDouble (string fieldName, double value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteDate (string fieldName, DateTime value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteString (string fieldName, string value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteObject (string fieldName, object value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteBooleanArray (string fieldName, bool[] value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteCharArray (string fieldName, char[] value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteByteArray (string fieldName, byte[] value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteShortArray (string fieldName, short[] value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteIntArray (string fieldName, int[] value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteLongArray (string fieldName, long[] value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteFloatArray (string fieldName, float[] value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteDoubleArray (string fieldName, double[] value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteStringArray (string fieldName, string[] value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteObjectArray (string fieldName, object[] value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteArrayOfByteArrays (string fieldName, byte[][] value)
 Writes the named field with the given value to the serialized form. The fields type is More...
 
IPdxInstanceFactory WriteField (string fieldName, object fieldValue)
 Writes the named field with the given value and type to the serialized form. This method uses the More...
 
IPdxInstanceFactory MarkIdentityField (string fieldName)
 Indicate that the named field should be included in hashCode and equals checks of this object on a server that is accessing IPdxInstance or when a client executes a query on a server. More...
 

Detailed Description

PdxInstanceFactory gives you a way to create PdxInstances. Call the write methods to populate the field data and then call Create to produce an actual instance that contains the data. To create a factory call ICache.CreatePdxInstanceFactory. A factory can only create a single instance. To create multiple instances create multiple factories or use IPdxInstance.CreateWriter to create subsequent instances.

Member Function Documentation

◆ Create()

IPdxInstance IPdxInstanceFactory.Create ( )

Create a IPdxInstance . The instance will contain any data written to this factory using the write methods.

Returns
the created instance
Exceptions
GemFireIllegalStateExceptionif called more than once

◆ MarkIdentityField()

IPdxInstanceFactory IPdxInstanceFactory.MarkIdentityField ( string  fieldName)

Indicate that the named field should be included in hashCode and equals checks of this object on a server that is accessing IPdxInstance or when a client executes a query on a server.

The fields that are marked as identity fields are used to generate the hashCode and equals methods of PdxInstance. Because of this, the identity fields should themselves either be primitives, or implement hashCode and equals.

If no fields are set as identity fields, then all fields will be used in hashCode and equals checks.

The identity fields should make marked after they are written using a write/// method.

Parameters
fieldNamethe name of the field to mark as an identity field.
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has not already been written.

◆ WriteArrayOfByteArrays()

IPdxInstanceFactory IPdxInstanceFactory.WriteArrayOfByteArrays ( string  fieldName,
byte  value[][] 
)

Writes the named field with the given value to the serialized form. The fields type is

byte[][].

Java byte[][] is mapped to .NET System.byte[][].

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteBoolean()

IPdxInstanceFactory IPdxInstanceFactory.WriteBoolean ( string  fieldName,
bool  value 
)

Writes the named field with the given value to the serialized form. The fields type is

boolean.

Java boolean is mapped to .NET System.bool.

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteBooleanArray()

IPdxInstanceFactory IPdxInstanceFactory.WriteBooleanArray ( string  fieldName,
bool[]  value 
)

Writes the named field with the given value to the serialized form. The fields type is

boolean[].

Java boolean[] is mapped to .NET System.bool[].

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteByte()

IPdxInstanceFactory IPdxInstanceFactory.WriteByte ( string  fieldName,
byte  value 
)

Writes the named field with the given value to the serialized form. The fields type is

sbyte.

Java byte is mapped to .NET System.sbyte.

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteByteArray()

IPdxInstanceFactory IPdxInstanceFactory.WriteByteArray ( string  fieldName,
byte[]  value 
)

Writes the named field with the given value to the serialized form. The fields type is

byte[].

Java byte[] is mapped to .NET System.byte[].

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteChar()

IPdxInstanceFactory IPdxInstanceFactory.WriteChar ( string  fieldName,
char  value 
)


Writes the named field with the given value to the serialized form. The fields type is

char.

Java char is mapped to .NET System.char.

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteCharArray()

IPdxInstanceFactory IPdxInstanceFactory.WriteCharArray ( string  fieldName,
char[]  value 
)

Writes the named field with the given value to the serialized form. The fields type is

char[].

Java char[] is mapped to .NET System.char[].

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteDate()

IPdxInstanceFactory IPdxInstanceFactory.WriteDate ( string  fieldName,
DateTime  value 
)

Writes the named field with the given value to the serialized form. The fields type is

Date.

Java Date is mapped to .NET System.DateTime.

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteDouble()

IPdxInstanceFactory IPdxInstanceFactory.WriteDouble ( string  fieldName,
double  value 
)

Writes the named field with the given value to the serialized form. The fields type is

double.

Java double is mapped to .NET System.Double.

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteDoubleArray()

IPdxInstanceFactory IPdxInstanceFactory.WriteDoubleArray ( string  fieldName,
double[]  value 
)

Writes the named field with the given value to the serialized form. The fields type is

double[].

Java double[] is mapped to .NET System.Double[].

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteField()

IPdxInstanceFactory IPdxInstanceFactory.WriteField ( string  fieldName,
object  fieldValue 
)

Writes the named field with the given value and type to the serialized form. This method uses the

fieldType to determine which writeXXX method it should call. If it can not find a specific match to a writeXXX method it will call WriteObject. This method may serialize objects that are not portable to non-java languages.

Parameters
fieldNamethe name of the field to write
fieldValuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteFloat()

IPdxInstanceFactory IPdxInstanceFactory.WriteFloat ( string  fieldName,
float  value 
)

Writes the named field with the given value to the serialized form. The fields type is

float.

Java float is mapped to .NET System.Single(float).

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteFloatArray()

IPdxInstanceFactory IPdxInstanceFactory.WriteFloatArray ( string  fieldName,
float[]  value 
)

Writes the named field with the given value to the serialized form. The fields type is

float[].

Java float[] is mapped to .NET System.Single[] or float[].

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteInt()

IPdxInstanceFactory IPdxInstanceFactory.WriteInt ( string  fieldName,
int  value 
)

Writes the named field with the given value to the serialized form. The fields type is

int.

Java int is mapped to .NET System.int.

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteIntArray()

IPdxInstanceFactory IPdxInstanceFactory.WriteIntArray ( string  fieldName,
int[]  value 
)

Writes the named field with the given value to the serialized form. The fields type is

int[].

Java int[] is mapped to .NET System.int[].

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteLong()

IPdxInstanceFactory IPdxInstanceFactory.WriteLong ( string  fieldName,
long  value 
)

Writes the named field with the given value to the serialized form. The fields type is

long.

Java long is mapped to .NET System.long.

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written


◆ WriteLongArray()

IPdxInstanceFactory IPdxInstanceFactory.WriteLongArray ( string  fieldName,
long[]  value 
)

Writes the named field with the given value to the serialized form. The fields type is

long[].

Java long[] is mapped to .NET System.long[].

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteObject()

IPdxInstanceFactory IPdxInstanceFactory.WriteObject ( string  fieldName,
object  value 
)

Writes the named field with the given value to the serialized form. The fields type is

object.

It is best to use one of the other writeXXX methods if your field type will always be XXX. This method allows the field value to be anything that is an instance of object. This gives you more flexibility but more space is used to store the serialized field.

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteObjectArray()

IPdxInstanceFactory IPdxInstanceFactory.WriteObjectArray ( string  fieldName,
object[]  value 
)

Writes the named field with the given value to the serialized form. The fields type is

object[]. Java object[] is mapped to .NET System.Collections.Generic.List<T>

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteShort()

IPdxInstanceFactory IPdxInstanceFactory.WriteShort ( string  fieldName,
short  value 
)

Writes the named field with the given value to the serialized form. The fields type is

short.

Java short is mapped to .NET System.short.

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteShortArray()

IPdxInstanceFactory IPdxInstanceFactory.WriteShortArray ( string  fieldName,
short[]  value 
)

Writes the named field with the given value to the serialized form. The fields type is

short[].

Java short[] is mapped to .NET System.short[].

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteString()

IPdxInstanceFactory IPdxInstanceFactory.WriteString ( string  fieldName,
string  value 
)

Writes the named field with the given value to the serialized form. The fields type is

string.

Java string is mapped to .NET System.string.

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

◆ WriteStringArray()

IPdxInstanceFactory IPdxInstanceFactory.WriteStringArray ( string  fieldName,
string[]  value 
)

Writes the named field with the given value to the serialized form. The fields type is

string[].

Java string[] is mapped to .NET System.string[].

Parameters
fieldNamethe name of the field to write
valuethe value of the field to write
Returns
this PdxInstanceFactory
Exceptions
GemFireDuplicateFieldExceptionif the named field has already been written

The documentation for this interface was generated from the following file:
  • gemfire.client/Interfaces/IPdxInstanceFactory.cs