Show / Hide Table of Contents

Interface IPofValue

IPofValue represents the POF data structure in a POF stream, or any sub-structure or value thereof.

Namespace: Tangosol.IO.Pof.Reflection
Assembly: Coherence.dll
Syntax
public interface IPofValue

Properties

Parent

Return the parent of this value.

Declaration
IPofValue Parent { get; }
Property Value
Type Description
IPofValue

The parent value, or null if this is the root value.

Root

Return the root of the hierarchy this value belongs to.

Declaration
IPofValue Root { get; }
Property Value
Type Description
IPofValue

The root value.

TypeId

Obtain the POF type identifier for this value.

Declaration
int TypeId { get; }
Property Value
Type Description
int

POF type identifier for this value.

Methods

ApplyChanges()

Apply all the changes that were made to this value and return a binary representation of the new value.

Declaration
Binary ApplyChanges()
Returns
Type Description
Binary

New Binary object that contains modified IPofValue.

Remarks

Any format prefixes and/or decorations that were present in the original buffer this value orginated from will be preserved.

Note: This method can only be called on the root IPofValue.
Exceptions
Type Condition
NotSupportedException

If called on a non-root IPofValue.

GetBoolean()

Return the Boolean which this IPofValue represents.

Declaration
bool GetBoolean()
Returns
Type Description
bool

The Boolean value.

GetBooleanArray()

Return the Boolean[] which this IPofValue represents.

Declaration
bool[] GetBooleanArray()
Returns
Type Description
bool[]

The Boolean[] value.

GetByte()

Return the Byte which this IPofValue represents.

Declaration
byte GetByte()
Returns
Type Description
byte

The Byte value.

GetByteArray()

Return the Byte[] which this IPofValue represents.

Declaration
byte[] GetByteArray()
Returns
Type Description
byte[]

The Byte[] value.

GetChanges()

Return a binary containing changes made to this IPofValue in the format defined by the BinaryDeltaCompressor.

Declaration
Binary GetChanges()
Returns
Type Description
Binary

A binary containing changes made to this IPofValue.

Remarks

Note: This method can only be called on the root IPofValue.

Exceptions
Type Condition
NotSupportedException

If called on a non-root IPofValue.

GetChar()

Return the Char which this IPofValue represents.

Declaration
char GetChar()
Returns
Type Description
char

The Char value.

GetCharArray()

Return the Char[] which this IPofValue represents.

Declaration
char[] GetCharArray()
Returns
Type Description
char[]

The Char[] value.

GetChild(int)

Locate a child IPofValue contained within this IPofValue.

Declaration
IPofValue GetChild(int nIndex)
Parameters
Type Name Description
int nIndex

Index of the child value to get.

Returns
Type Description
IPofValue

The the child IPofValue.

Remarks

The returned IPofValue could represent a non-existent (null) value.

Exceptions
Type Condition
PofNavigationException

If this value is a "terminal" or the child value cannot be located for any other reason.

GetCollection(ICollection)

Return an ICollection of object values which this IPofValue represents.

Declaration
ICollection GetCollection(ICollection coll)
Parameters
Type Name Description
ICollection coll

The optional ICollection to use to store the values.

Returns
Type Description
ICollection

An ICollection of object values.

GetCollection<T>(ICollection<T>)

Return an ICollection<T> of object values which this IPofValue represents.

Declaration
ICollection<T> GetCollection<T>(ICollection<T> coll)
Parameters
Type Name Description
ICollection<T> coll

The optional ICollection<T> to use to store the values.

Returns
Type Description
ICollection<T>

An ICollection<T> of object values.

Type Parameters
Name Description
T

The type of the elements in the collection.

GetDate()

Return the DateTime which this IPofValue represents.

Declaration
DateTime GetDate()
Returns
Type Description
DateTime

The DateTime value.

Remarks

This method will return only the date component. It will ignore the time component if present and initialize the time-related fields of the return value to their default values.

GetDateTime()

Return the DateTime which this IPofValue represents.

Declaration
DateTime GetDateTime()
Returns
Type Description
DateTime

The DateTime value.

GetDayTimeInterval()

Return the TimeSpan which this IPofValue represents.

Declaration
TimeSpan GetDayTimeInterval()
Returns
Type Description
TimeSpan

The TimeSpan value.

GetDecimal()

Return the Decimal which this IPofValue represents.

Declaration
decimal GetDecimal()
Returns
Type Description
decimal

The Decimal value.

GetDictionary(IDictionary)

Return an IDictionary of key/value pairs which this IPofValue represents.

Declaration
IDictionary GetDictionary(IDictionary dict)
Parameters
Type Name Description
IDictionary dict

The optional IDictionary to use to store the key/value pairs.

Returns
Type Description
IDictionary

An IDictionary of key/value pairs.

GetDictionary<TKey, TValue>(IDictionary<TKey, TValue>)

Read an IDictionar<TKey, TValue>y of key/value pairs which this IPofValue represents.

Declaration
IDictionary<TKey, TValue> GetDictionary<TKey, TValue>(IDictionary<TKey, TValue> dict)
Parameters
Type Name Description
IDictionary<TKey, TValue> dict

The optional IDictionary<TKey, TValue> use to store the key/value pairs.

Returns
Type Description
IDictionary<TKey, TValue>

An IDictionary<TKey, TValue> of key/value pairs.

Type Parameters
Name Description
TKey

The key type of the IDictionary<TKey, TValue>.

TValue

The value type of the IDictionary<TKey, TValue>.

GetDouble()

Return the Double which this IPofValue represents.

Declaration
double GetDouble()
Returns
Type Description
double

The Double value.

GetDoubleArray()

Return the Double[] which this IPofValue represents.

Declaration
double[] GetDoubleArray()
Returns
Type Description
double[]

The Double[] value.

GetInt16()

Return the Int16 which this IPofValue represents.

Declaration
short GetInt16()
Returns
Type Description
short

The Int16 value.

GetInt16Array()

Return the Int16[] which this IPofValue represents.

Declaration
short[] GetInt16Array()
Returns
Type Description
short[]

The Int16[] value.

GetInt32()

Return the Int32 which this IPofValue represents.

Declaration
int GetInt32()
Returns
Type Description
int

The Int32 value.

GetInt32Array()

Return the Int32[] which this IPofValue represents.

Declaration
int[] GetInt32Array()
Returns
Type Description
int[]

The Int32[] value.

GetInt64()

Return the Int64 which this IPofValue represents.

Declaration
long GetInt64()
Returns
Type Description
long

The Int64 value.

GetInt64Array()

Return the Int64[] which this IPofValue represents.

Declaration
long[] GetInt64Array()
Returns
Type Description
long[]

The Int64[] value.

GetSingle()

Return the Single which this IPofValue represents.

Declaration
float GetSingle()
Returns
Type Description
float

The Single value.

GetSingleArray()

Return the Single[] which this IPofValue represents.

Declaration
float[] GetSingleArray()
Returns
Type Description
float[]

The Single[] value.

GetString()

Return the String which this IPofValue represents.

Declaration
string GetString()
Returns
Type Description
string

The String value.

GetValue()

Return the deserialized value which this IPofValue represents.

Declaration
object GetValue()
Returns
Type Description
object

The deserialized value.

Remarks

For primitive types such as int or bool, the POF type is not stored in the POF stream. Therefore, for primitive types, the POF type or .NET type must be explicitly specified via GetValue(int) or GetValue(Type).

GetValue(int)

Return the deserialized value which this IPofValue represents.

Declaration
object GetValue(int typeId)
Parameters
Type Name Description
int typeId

The required POF type of the returned value or T_UNKNOWN if the type is to be inferred from the serialized state.

Returns
Type Description
object

The deserialized value.

Remarks

For primitive types such as int or bool, the POF type is not stored in the POF stream. Therefore, for primitive types, the type must be explicitly specified with the typeId parameter.

Exceptions
Type Condition
InvalidCastException

If the value is incompatible with the specified type.

GetValue(Type)

Return the deserialized value which this IPofValue represents.

Declaration
object GetValue(Type type)
Parameters
Type Name Description
Type type

The required type of the returned value or null if the type is to be inferred from the serialized state.

Returns
Type Description
object

The deserialized value.

Remarks

For primitive types such as int or bool, the POF type is not stored in the POF stream. Therefore, for primitive types, the type parameter must be non-null.

Exceptions
Type Condition
InvalidCastException

If the value is incompatible with the specified type.

SetValue(object)

Update this IPofValue.

Declaration
void SetValue(object oValue)
Parameters
Type Name Description
object oValue

New deserialized value for this IPofValue.

Remarks

The changes made using this method will be immediately reflected in the result of GetValue() method, but will not be applied to the underlying POF stream until the ApplyChanges() method is invoked on the root IPofValue.

In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.