public class NoSQLAvroSerializer extends Base implements Serializer, XmlConfigurable
Serializerinterface. This implementation is Avro schema-aware and will convert values to Object format using Avro binding objects when they are read from the database. Though it is possible that it could be useful in other contexts, it is primarily intended for use in conjunction with the
Users are not expected to directly interact with this class. It is expected that the class is managed by Oracle Coherence as the result of XML configuration supplied to Oracle Coherence at program startup. The documentation contained in this class is intended primarily to explain the XML configuration options.
Value, plus Avro schema-based Records, and delegates other types to the default serializer.
Avro records may be any of
GenericRecord, or an implementation of
Avro-based types are not known to us at compile-time, so we need to
communicate the Schema as part of the stream. In order to keep the stream
compact, it relies on the Oracle NoSQL Database schema catalog. Since these
types are either sourced from the database or destined to be stored in the
database, so there must be an Avro type in the schema catalog, and the
serialization leverages the schema type identifiers from the catalog.
When a serialized
JsonRecord object is
received by the Serializer and it needs to be deserialized, this module
needs to know the Schema version that is expected by the application. The
schema files that define the Avro types must be declared by the application
(see schemaFiles). When a
SpecificRecord is received, its schema
version is determined by loading the corresponding SpecificRecord
storeName - (Required) The Oracle NoSQL Database instance name that
is used to provide persistence for your Oracle Coherence cache.
helperHosts - (Required) A comma-separated list of helperHost:port
values that serve as the gateway to the Oracle NoSQL Database instance.
schemaFiles - (Optional) When Generic or Json format is selected,
The application needs to identify the specific version of the schema that
it expects. It does this by providing a comma separated list of schema
definition files. Each file is located as a system resource and should
be named in resource form (e.g. /my/path/to/schema.avsc). Be sure to
include the schema file paths to your java classpath otherwise a
MissingResourceException will be thrown.
<serializer> <instance> <class-name>oracle.kv.coherence.NoSQLAvroSerializer</class-name> <init-params> <init-param> <param-name>storeName</param-name> <param-value>kvstore</param-value> </init-param> <init-param> <param-name>helperHosts</param-name> <param-value>myhost:5000</param-value> </init-param> <init-param> <param-name>schemaFiles</param-name> <param-value>my/app/datatype.avsc,my/app/othertype.avsc</param-value> </init-param> </init-params> </instance> </serializer>
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getRandom, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, wait
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Copyright (c) 2011, 2014 Oracle and/or its affiliates. All rights reserved.