Note, that an already persisted stream might still contain references for immutable types. They can be dereferenced at deserialization time, unless the type is explicitly declared as unreferenceable. However, this is only possible at the expense of memory book-keeping all instances.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addImmutableType(final Class<T>
the immutable type type, final boolean flag for possible references isReferenceable)Declare a type as immutable. |
| public boolean | isImmutableValueType(Class<T> type)
Overrides com. Implements com. |
| public boolean | isReferenceable(final Class<T> type)
Overrides com. Implements com. |
| immutableTypes | back to summary |
|---|---|
| private final Set<E> immutableTypes | |
| unreferenceableTypes | back to summary |
|---|---|
| private final Set<E> unreferenceableTypes | |
| ImmutableTypesMapper | back to summary |
|---|---|
| public ImmutableTypesMapper(Mapper wrapped) | |
| addImmutableType | back to summary |
|---|---|
| public void addImmutableType(Class<T> type)
Deprecated As of 1.4.9 use | |
| addImmutableType | back to summary |
|---|---|
| public void addImmutableType(final Class<T> type, final boolean isReferenceable) Declare a type as immutable.
| |
| isImmutableValueType | back to summary |
|---|---|
| public boolean isImmutableValueType(Class<T> type) Overrides com. Implements com. Doc from com. Whether this type is a simple immutable value (int, boolean, String, URL, etc). Immutable types will be repeatedly written in the serialized stream, instead of using object references. | |
| isReferenceable | back to summary |
|---|---|
| public boolean isReferenceable(final Class<T> type) Overrides com. Implements com. Doc from com. Whether this type is referenceable in a stream. | |