public static enum SerializableByConvention.Reason extends Enum<SerializableByConvention.Reason>
Enum Constant and Description |
---|
INHERITANCE
Class is
Serializable due to inheritance or other coding conventions and cannot or is not desirable
to have it converted to IdentifiedDataSerializable . |
PUBLIC_API
Class definition is part of public API so cannot be migrated to
IdentifiedDataSerializable in
minor or patch releases. |
Modifier and Type | Method and Description |
---|---|
static SerializableByConvention.Reason |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SerializableByConvention.Reason[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SerializableByConvention.Reason PUBLIC_API
IdentifiedDataSerializable
in
minor or patch releases.public static final SerializableByConvention.Reason INHERITANCE
Serializable
due to inheritance or other coding conventions and cannot or is not desirable
to have it converted to IdentifiedDataSerializable
.
Examples:
Serializable
class external to Hazelcast e.g.
CacheEntryEvent
is serializable however its implementation in
CacheEntryEventImpl
is never used in serialized form, so there
is no interest in converting this class to IdentifiedDataSerializable
Comparator
which should by convention also implement Serializable
.Serializable
without a default constructor or with private
final fields, such as Throwable
or EventObject
, cannot be converted to
IdentifiedDataSerializable
, so these are not annotated with SerializableByConvention
.
Instead these classes are white-listed in
com.hazelcast.internal.serialization.impl.DataSerializableConventionsTest#SERIALIZABLE_WHITE_LIST
and are excluded from conventions testing.public static SerializableByConvention.Reason[] values()
for (SerializableByConvention.Reason c : SerializableByConvention.Reason.values()) System.out.println(c);
public static SerializableByConvention.Reason valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2018 Hazelcast, Inc.. All rights reserved.