org.apache.ignite.marshaller.optimized

## Interface OptimizedMarshallable

All Known Implementing Classes:
  CacheInvokeResult, GridCacheReturn, GridCacheVersion, GridCacheVersionEx, GridStreamerExecutionBatch, IgniteExternalizableExpiryPolicy, IgniteTxEntry, IgniteUuid

    public interface OptimizedMarshallable

Optional interface which helps make serialization even faster by removing internal look-ups for classes.

All implementation must have the following:

- Must have static filed (private or public) declared of type `Object` with name `GG_CLASS_ID`. Ignite will reflectively initialize this field with proper class ID during system startup.
- Must return the value of `GG_CLASS_ID` field from `ggClassId()` method.

Here is a sample implementation:

     // For better performance consider implementing java.io.Externalizable interface.
     class ExampleMarshallable implements GridOptimizedMarshallable, Serializable {
         // Class ID field required by 'GridOptimizedMarshallable'.
         private static Object GG_CLASS_ID;

         ...

         @ public Object ggClassId() {
             return GG_CLASS_ID;
         }
     }

Note that for better performance you should also specify list of classes you plan to serialize via `OptimizedMarshaller.setClassNames(List)` method.

### Field Summary

Fields
`static String` `CLS_ID_FIELD_NAME`

### Method Summary

Methods
`Object` `ggClassId()` Implementation of this method should simply return value of `GG_CLASS_ID` field.

### Field Detail

#### CLS_ID_FIELD_NAME

    static final String CLS_ID_FIELD_NAME

See Also:
  Constant Field Values

### Method Detail

#### ggClassId

    Object ggClassId()

Implementation of this method should simply return value of `GG_CLASS_ID` field.

Returns:
  Class ID for optimized marshalling.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015