org.apache.ignite.internal.processors.cache.binary

## Interface CacheObjectBinaryProcessor

All Superinterfaces:
  GridComponent, GridProcessor, IgniteCacheObjectProcessor

All Known Implementing Classes:
  CacheObjectBinaryProcessorImpl

    public interface CacheObjectBinaryProcessor
    extends IgniteCacheObjectProcessor

Extended cache object processor interface with additional methods for binary.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent

`GridComponent.DiscoveryDataExchangeType`

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `addMeta(int typeId, BinaryType newMeta)`
`void` `addMetaLocally(int typeId, BinaryType newMeta)` Adds metadata locally without triggering discovery exchange.
`IgniteBinary` `binary()`
`BinaryObject` `buildEnum(String typeName, int ord)`
`BinaryObject` `buildEnum(String typeName, String name)`
`BinaryObjectBuilder` `builder(BinaryObject binaryObj)` Creates builder initialized by existing binary object.
`BinaryObjectBuilder` `builder(String clsName)`
`Object` `marshalToBinary(Object obj)`
`Collection<BinaryType>` `metadata()`
`Map<Integer,BinaryType>` `metadata(Collection<Integer> typeIds)`
`BinaryType` `metadata(int typeId)`
`BinaryType` `metadata(int typeId, int schemaId)`
`BinaryType` `registerEnum(String typeName, Map<String,Integer> vals)` Register enum type
`void` `updateMetadata(int typeId, String typeName, String affKeyFieldName, Map<String,BinaryFieldMetadata> fieldTypeIds, boolean isEnum, Map<String,Integer> enumMap)`

### Methods inherited from interface org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor

`contextForCache, field, hasField, immutable, isBinaryEnabled, isBinaryObject, marshal, onContinuousProcessorStarted, prepareForCache, toCacheKeyObject, toCacheObject, toCacheObject, toCacheObject, toCacheObject, toKeyCacheObject, toKeyCacheObject, typeId, typeId, unmarshal, unwrapTemporary`

### Methods inherited from interface org.apache.ignite.internal.GridComponent

`collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, stop, validateNode, validateNode`

### Method Detail

#### builder

    BinaryObjectBuilder builder(String clsName)

Parameters:
  `clsName` - Class name.
Returns:
  Builder.

#### builder

    BinaryObjectBuilder builder(BinaryObject binaryObj)

Creates builder initialized by existing binary object.

Parameters:
  `binaryObj` - Binary object to edit.
Returns:
  Binary builder.

#### addMeta

    void addMeta(int typeId,
                 BinaryType newMeta)
          throws IgniteException

Parameters:
  `typeId` - Type ID.
  `newMeta` - New meta data.
Throws:
  `IgniteException` - In case of error.

#### addMetaLocally

    void addMetaLocally(int typeId,
                        BinaryType newMeta)
                 throws IgniteException

Adds metadata locally without triggering discovery exchange. Must be used only during startup and only if it is guaranteed that all nodes have the same copy of BinaryType.

Parameters:
  `typeId` - Type ID.
  `newMeta` - New meta data.
Throws:
  `IgniteException` - In case of error.

#### updateMetadata

    void updateMetadata(int typeId,
                        String typeName,
                        @Nullable
                        String affKeyFieldName,
                        Map<String,BinaryFieldMetadata> fieldTypeIds,
                        boolean isEnum,
                        @Nullable
                        Map<String,Integer> enumMap)
                 throws IgniteException

Parameters:
  `typeId` - Type ID.
  `typeName` - Type name.
  `affKeyFieldName` - Affinity key field name.
  `fieldTypeIds` - Fields map.
  `isEnum` - Enum flag.
  `enumMap` - Enum name to ordinal mapping.
Throws:
  `IgniteException` - In case of error.

#### metadata

    @Nullable
    BinaryType metadata(int typeId)
                           throws IgniteException

Parameters:
  `typeId` - Type ID.
Returns:
  Meta data.
Throws:
  `IgniteException` - In case of error.

#### metadata

    @Nullable
    BinaryType metadata(int typeId,
                                  int schemaId)
                           throws IgniteException

Parameters:
  `typeId` - Type ID.
  `schemaId` - Schema ID.
Returns:
  Meta data.
Throws:
  `IgniteException` - In case of error.

#### metadata

    Map<Integer,BinaryType> metadata(Collection<Integer> typeIds)
                              throws IgniteException

Parameters:
  `typeIds` - Type ID.
Returns:
  Meta data.
Throws:
  `IgniteException` - In case of error.

#### metadata

    Collection<BinaryType> metadata()
                             throws IgniteException

Returns:
  Metadata for all types.
Throws:
  `IgniteException` - In case of error.

#### buildEnum

    BinaryObject buildEnum(String typeName,
                           int ord)
                    throws IgniteException

Parameters:
  `typeName` - Type name.
  `ord` - ordinal.
Returns:
  Enum object.
Throws:
  `IgniteException` - If failed.

#### buildEnum

    BinaryObject buildEnum(String typeName,
                           String name)
                    throws IgniteException

Parameters:
  `typeName` - Type name.
  `name` - Name.
Returns:
  Enum object.
Throws:
  `IgniteException` - If failed.

#### registerEnum

    BinaryType registerEnum(String typeName,
                            Map<String,Integer> vals)
                     throws IgniteException

Register enum type

Parameters:
  `typeName` - Type name.
  `vals` - Mapping of enum constant names to ordinals.
Returns:
  Binary Type for registered enum.
Throws:
  `IgniteException`

#### binary

    IgniteBinary binary()
                 throws IgniteException

Specified by:
  `binary` in interface `IgniteCacheObjectProcessor`
Returns:
  Binaries interface.
Throws:
  `IgniteException` - If failed.

#### marshalToBinary

    Object marshalToBinary(Object obj)
                    throws IgniteException

Parameters:
  `obj` - Original object.
Returns:
  Binary object (in case binary marshaller is used).
Throws:
  `IgniteException` - If failed.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018