Interface IPofHandler
This interface defines the handler for an event-driven approach to parsing (or assembling) a POF stream.
Namespace: Tangosol.IO.Pof
Assembly: Coherence.dll
Syntax
public interface IPofHandler
Methods
BeginArray(int, int)
Report that an array of values has been encountered in the POF stream.
Declaration
void BeginArray(int position, int elementCount)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | elementCount | The exact number of values (elements) in the array. |
Remarks
This method call will be followed by a separate call to an "on" or "begin" method for each of the elementCount elements in the array, and the array extent will then be terminated by a call to EndComplexValue().
BeginCollection(int, int)
Report that a collection of values has been encountered in the POF stream.
Declaration
void BeginCollection(int position, int elementCount)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | elementCount | The exact number of values (elements) in the collection. |
Remarks
This method call will be followed by a separate call to an "on" or "begin" method for each of the elementCount elements in the collection, and the collection extent will then be terminated by a call to EndComplexValue().
BeginMap(int, int)
Report that a map of key/value pairs has been encountered in the POF stream.
Declaration
void BeginMap(int position, int elementCount)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | elementCount | The exact number of key/value pairs (entries) in the map. |
Remarks
This method call will be followed by a separate call to an "on" or "begin" method for each of the elementCount elements in the map, and the map extent will then be terminated by a call to EndComplexValue().
BeginSparseArray(int, int)
Report that a sparse array of values has been encountered in the POF stream.
Declaration
void BeginSparseArray(int position, int elementCount)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | elementCount | The exact number of elements in the array, which is greater than or equal to the number of values in the sparse POF stream; in other words, the number of values that will subsequently be reported will not exceed this number. |
Remarks
This method call will be followed by a separate call to an "on" or "begin" method for present element in the sparse array (up to elementCount elements), and the array extent will then be terminated by a call to EndComplexValue().
BeginUniformArray(int, int, int)
Report that a uniform array of values has been encountered in the POF stream.
Declaration
void BeginUniformArray(int position, int elementCount, int typeId)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | elementCount | The exact number of values (elements) in the array. |
int | typeId | The type identifier for all of the values in the uniform array. |
Remarks
This method call will be followed by a separate call to an "on" or "begin" method for each of the cElements elements in the array, and the array extent will then be terminated by a call to EndComplexValue().
BeginUniformCollection(int, int, int)
Report that a uniform collection of values has been encountered in the POF stream.
Declaration
void BeginUniformCollection(int position, int elementCount, int typeId)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | elementCount | The exact number of values (elements) in the collection. |
int | typeId | The type identifier for all of the values in the uniform collection. |
Remarks
This method call will be followed by a separate call to an "on" or "begin" method for each of the elementCount elements in the collection, and the collection extent will then be terminated by a call to EndComplexValue().
BeginUniformKeysMap(int, int, int)
Report that a map of key/value pairs (with the keys being of a uniform type) has been encountered in the POF stream.
Declaration
void BeginUniformKeysMap(int position, int elementCount, int typeIdKeys)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | elementCount | The exact number of key/value pairs (entries) in the map. |
int | typeIdKeys | The type identifier for all of the keys in the uniform-keys map. |
Remarks
This method call will be followed by a separate call to an "on" or "begin" method for each of the elementCount elements in the map, and the map extent will then be terminated by a call to EndComplexValue().
BeginUniformMap(int, int, int, int)
Report that a map of key/value pairs (with the keys being of a uniform type and the values being of a uniform type) has been encountered in the POF stream.
Declaration
void BeginUniformMap(int position, int elementCount, int typeIdKeys, int typeIdValues)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | elementCount | The exact number of key/value pairs (entries) in the map. |
int | typeIdKeys | The type identifier for all of the keys in the uniform map. |
int | typeIdValues | The type identifier for all of the values in the uniform map. |
Remarks
This method call will be followed by a separate call to an "on" or "begin" method for each of the elementCount elements in the map, and the map extent will then be terminated by a call to EndComplexValue().
BeginUniformSparseArray(int, int, int)
Report that a uniform sparse array of values has been encountered in the POF stream.
Declaration
void BeginUniformSparseArray(int position, int elementCount, int typeId)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | elementCount | The exact number of elements in the array, which is greater than or equal to the number of values in the sparse POF stream; in other words, the number of values that will subsequently be reported will not exceed this number. |
int | typeId | The type identifier for all of the values in the uniform sparse array. |
Remarks
This method call will be followed by a separate call to an "on" or "begin" method for present element in the sparse array (up to elementCount elements), and the array extent will then be terminated by a call to EndComplexValue().
BeginUserType(int, int, int, int)
Report that a value of a "user type" has been encountered in the POF stream. A user type is analogous to a "type", and a value of a user type is analogous to an "object".
Declaration
void BeginUserType(int position, int nId, int typeId, int versionId)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | nId | Identity of the object to encode, or -1 if identity shouldn't be encoded in the POF stream. |
int | typeId | The user type identifier, (typeId >= 0). |
int | versionId | The version identifier for the user data type data in the POF stream, (versionId >= 0). |
Remarks
This method call will be followed by a separate call to an "on" or "begin" method for each of the property values in the user type, and the user type will then be terminated by a call to EndComplexValue().
EndComplexValue()
Signifies the termination of the current complex value.
Declaration
void EndComplexValue()
Remarks
Complex values are any of the collection, array, map and user types. For each call to one of the "begin" methods, there will be a corresponding call to this method, even if there were no contents in the complex value.
OnBoolean(int, bool)
Report that a boolean value has been encountered in the POF stream.
Declaration
void OnBoolean(int position, bool f)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
bool | f | The boolean value. |
OnChar(int, char)
Report that a character value has been encountered in the POF stream.
Declaration
void OnChar(int position, char ch)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
char | ch | The character value as a Char. |
OnCharString(int, string)
Report that a character string value has been encountered in the POF stream.
Declaration
void OnCharString(int position, string s)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
string | s | The character string value as a String object. |
OnDate(int, int, int, int)
Report that a date value has been encountered in the POF stream.
Declaration
void OnDate(int position, int year, int month, int day)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | year | The year number as defined by ISO8601. |
int | month | The month number between 1 and 12 inclusive as defined by ISO8601. |
int | day | The day number between 1 and 31 inclusive as defined by ISO8601. |
OnDateTime(int, int, int, int, int, int, int, int, bool)
Report that a date-time value has been encountered in the POF stream.
Declaration
void OnDateTime(int position, int year, int month, int day, int hour, int minute, int second, int nano, bool isUTC)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | year | The year number as defined by ISO8601; note the difference with the Java Date class, whose year is relative to 1900. |
int | month | The month number between 1 and 12 inclusive as defined by ISO8601; note the difference from the Java Date class, whose month value is 0-based (0-11). |
int | day | The day number between 1 and 31 inclusive as defined by ISO8601. |
int | hour | The hour between 0 and 23 inclusive. |
int | minute | The minute value between 0 and 59 inclusive. |
int | second | The second value between 0 and 59 inclusive (and theoretically 60 for a leap-second). |
int | nano | The nanosecond value between 0 and 999999999 inclusive. |
bool | isUTC | true if the time value is UTC or false if the time value does not have an explicit time zone. |
OnDateTime(int, int, int, int, int, int, int, int, TimeSpan)
Report that a date-time value (with a timezone offset) has been encountered in the POF stream.
Declaration
void OnDateTime(int position, int year, int month, int day, int hour, int minute, int second, int nano, TimeSpan zoneOffset)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | year | The year number as defined by ISO8601; note the difference with the Java Date class, whose year is relative to 1900. |
int | month | The month number between 1 and 12 inclusive as defined by ISO8601; note the difference from the Java Date class, whose month value is 0-based (0-11). |
int | day | The day number between 1 and 31 inclusive as defined by ISO8601. |
int | hour | The hour between 0 and 23 inclusive. |
int | minute | The minute value between 0 and 59 inclusive. |
int | second | The second value between 0 and 59 inclusive (and theoretically 60 for a leap-second). |
int | nano | The nanosecond value between 0 and 999999999 inclusive. |
TimeSpan | zoneOffset | The timezone offset from UTC, for example 0 for BST, -5 for EST and +1 for CET. |
OnDayTimeInterval(int, int, int, int, int, int)
Report that a day-time interval value has been encountered in the POF stream.
Declaration
void OnDayTimeInterval(int position, int days, int hours, int minutes, int seconds, int nanos)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | days | The number of days in the day-time interval. |
int | hours | The number of hours in the day-time interval, from 0 to 23 inclusive. |
int | minutes | The number of minutes in the day-time interval, from 0 to 59 inclusive. |
int | seconds | The number of seconds in the day-time interval, from 0 to 59 inclusive. |
int | nanos | The number of nanoseconds in the day-time interval, from 0 to 999999999 inclusive. |
OnDecimal128(int, decimal)
Report that a Decimal value has been encountered in the POF stream.
Declaration
void OnDecimal128(int position, decimal dec)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
decimal | dec | The decimal value as a Decimal. |
OnDecimal32(int, decimal)
Report that a Decimal value has been encountered in the POF stream.
Declaration
void OnDecimal32(int position, decimal dec)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
decimal | dec | The decimal value as a Decimal. |
OnDecimal64(int, decimal)
Report that a Decimal value has been encountered in the POF stream.
Declaration
void OnDecimal64(int position, decimal dec)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
decimal | dec | The decimal value as a Decimal. |
OnFloat32(int, float)
Report that a base-2 single-precision floating point value has been encountered in the POF stream.
Declaration
void OnFloat32(int position, float fl)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
float | fl | The floating point value as a Single. |
OnFloat64(int, double)
Report that a base-2 double-precision floating point value has been encountered in the POF stream.
Declaration
void OnFloat64(int position, double dfl)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
double | dfl | The floating point value as a Double. |
OnIdentityReference(int, int)
Specifies that a reference to a previously-identified value has been encountered in the POF stream.
Declaration
void OnIdentityReference(int position, int id)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | id | The identity of the previously encountered value, as was specified in a previous call to RegisterIdentity(int). |
OnInt128(int, RawInt128)
Report that an Int128 value has been encountered in the POF stream.
Declaration
void OnInt128(int position, RawInt128 n)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
RawInt128 | n | The integer value as an Int128. |
OnInt16(int, short)
Report that an Int16 value has been encountered in the POF stream.
Declaration
void OnInt16(int position, short n)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
short | n | The integer value as an Int16. |
OnInt32(int, int)
Report that an Int32 value has been encountered in the POF stream.
Declaration
void OnInt32(int position, int n)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | n | The integer value as an Int32. |
OnInt64(int, long)
Report that an Int64 value has been encountered in the POF stream.
Declaration
void OnInt64(int position, long n)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
long | n | The integer value as an Int64. |
OnNullReference(int)
Specifies that a null
value has been encountered in the
POF stream.
Declaration
void OnNullReference(int position)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
OnOctet(int, int)
Report that an octet value (a byte) has been encountered in the POF stream.
Declaration
void OnOctet(int position, int b)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | b | The octet value as an int whose value is in the range 0 to 255 (0x00-0xFF) inclusive. |
OnOctetString(int, Binary)
Report that a octet string value has been encountered in the POF stream.
Declaration
void OnOctetString(int position, Binary bin)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
Binary | bin | The octect string value as a Binary object. |
OnTime(int, int, int, int, int, bool)
Report that a time value has been encountered in the POF stream.
Declaration
void OnTime(int position, int hour, int minute, int second, int nanosecond, bool isUTC)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | hour | The hour between 0 and 23 inclusive. |
int | minute | The minute value between 0 and 59 inclusive. |
int | second | The second value between 0 and 59 inclusive (and theoretically 60 for a leap-second). |
int | nanosecond | The nanosecond value between 0 and 999999999 inclusive. |
bool | isUTC | true if the time value is UTC or false if the time value does not have an explicit time zone. |
OnTime(int, int, int, int, int, TimeSpan)
Report that a time value (with a timezone offset) has been encountered in the POF stream.
Declaration
void OnTime(int position, int hour, int minute, int second, int nano, TimeSpan zoneOffset)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | hour | The hour between 0 and 23 inclusive. |
int | minute | The minute value between 0 and 59 inclusive. |
int | second | The second value between 0 and 59 inclusive (and theoretically 60 for a leap-second). |
int | nano | The nanosecond value between 0 and 999999999 inclusive. |
TimeSpan | zoneOffset | The timezone offset from UTC, for example 0 for BST, -5 for EST and +1 for CET. |
See Also
OnTimeInterval(int, int, int, int, int)
Report that a time interval value has been encountered in the POF stream.
Declaration
void OnTimeInterval(int position, int hours, int minutes, int seconds, int nanos)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | hours | The number of hours in the time interval. |
int | minutes | The number of minutes in the time interval, from 0 to 59 inclusive. |
int | seconds | The number of seconds in the time interval, from 0 to 59 inclusive. |
int | nanos | The number of nanoseconds, from 0 to 999999999 inclusive. |
OnYearMonthInterval(int, int, int)
Report that a year-month interval value has been encountered in the POF stream.
Declaration
void OnYearMonthInterval(int position, int years, int months)
Parameters
Type | Name | Description |
---|---|---|
int | position | Context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a dictionary, -1 otherwise. |
int | years | The number of years in the year-month interval. |
int | months | The number of months in the year-month interval. |
RegisterIdentity(int)
This method is invoked when an identity is encountered in the POF stream.
Declaration
void RegisterIdentity(int id)
Parameters
Type | Name | Description |
---|---|---|
int | id | If (id >= 0), then this is the identity encountered in the POF stream, otherwise it is an indicator that the following value could have been assigned an identifier but was not (i.e. that the subsequent value is of a referenceable data type). |
Remarks
The identity is used to uniquely identify the next value in the POF stream, and can be later referenced by the OnIdentityReference(int, int) method.