Fork me on GitHub

The Value Namespace

WARNING

This namespace is now deprecated, simply because the same functionality can be achieved using the standard Coherence class-scheme and instance Cache Configuration elements.

The Value Namespace provides the ability to declare XML element content that will be interpreted as strongly typed values. It is typically used with other Namespaces where strongly typed values are required as parameters.

Namespace Content Handler

The implementation is provided by the com.oracle.coherence.environment.extensible.namespaces.ValueNamespaceContentHandler class.

Declaration

The common prefix used for this namespace in Cache Configurations is value, however as with all XML namespace declarations this can be defined arbitrarily when declaring the namespace.

To use the namespace you should declare it as follows:

<cache-config xmlns:value="class://com.oracle.coherence.environment.extensible.namespaces.ValueNamespaceContentHandler">

   ...

</cache-config>

Elements

The following section outlines the elements defined by this Namespace.

<value:boolean>

The value:boolean element represents a java.lang.Boolean value.

Resolved Element Type:

When processed this element will be resolved to produce a java.lang.Boolean.

Examples:

A true value:

<value:boolean>true</value:boolean>

A false value:

<value:boolean>false</value:boolean>

<value:byte>

The value:byte element represents a java.lang.Byte value.

Resolved Element Type:

When processed this element will be resolved to produce a java.lang.Byte.

Examples:

Simple Byte values:

<value:byte>0</value:byte>
<value:byte>1</value:byte>
<value:byte>10</value:byte>
<value:byte>255</value:byte>

<value:double>

The value:double element represents a java.lang.Double value.

Resolved Element Type:

When processed this element will be resolved to produce a java.lang.Double.

Examples:

Simple Double values:

<value:double>0.0</value:double>
<value:double>1.0213</value:double>
<value:double>-1001.098</value:double>

<value:float>

The value:float element represents a java.lang.Float value.

Resolved Element Type:

When processed this element will be resolved to produce a java.lang.Float.

Examples:

Simple Float values:

<value:float>0.0</value:float>
<value:float>1.0213</value:float>
<value:float>-1001.098</value:float>

<value:integer>

The value:integer element represents a java.lang.Integer value.

Resolved Element Type:

When processed this element will be resolved to produce a java.lang.Integer.

Examples:

Simple Integer values:

<value:integer>0</value:integer>
<value:integer>-1</value:integer>
<value:integer>100</value:integer>
<value:integer>32023</value:integer>

<value:long>

The value:long element represents a java.lang.Long value.

Resolved Element Type:

When processed this element will be resolved to produce a java.lang.Long.

Examples:

Simple Long values:

<value:long>0</value:long>
<value:long>-1243242</value:long>
<value:long>1024</value:long>
<value:long>32432023</value:long>

<value:short>

The value:short element represents a java.lang.Short value.

Resolved Element Type:

When processed this element will be resolved to produce a java.lang.Short.

Examples:

Simple Short values:

<value:short>0</value:short>
<value:short>-1</value:short>
<value:short>100</value:short>
<value:short>32023</value:short>

<value:string>

The value:string element represents a java.lang.String value.

Resolved Element Type:

When processed this element will be resolved to produce a java.lang.String.

Examples:

An empty String:

<value:string></value:string>

A simple String:

<value:string>Gudday World</value:string>