org.apache.ignite.internal.processors.cache

## Class CacheObjectContext

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.CacheObjectContext

All Implemented Interfaces:
  CacheObjectValueContext

Direct Known Subclasses:
  CacheObjectBinaryContext

    public class CacheObjectContext
    extends Object
    implements CacheObjectValueContext

### Constructor Summary

Constructors
Constructor and Description
`CacheObjectContext(GridKernalContext kernalCtx, String cacheName, AffinityKeyMapper dfltAffMapper, boolean cpyOnGet, boolean storeVal, boolean addDepInfo)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `addDeploymentInfo()`
`boolean` `binaryEnabled()`
`String` `cacheName()`
`boolean` `copyOnGet()`
`AffinityKeyMapper` `defaultAffMapper()`
`GridKernalContext` `kernalContext()`
`boolean` `storeValue()`
`Object` `unwrapBinaryIfNeeded(Object o, boolean keepBinary, boolean cpy)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CacheObjectContext

    public CacheObjectContext(GridKernalContext kernalCtx,
                              String cacheName,
                              AffinityKeyMapper dfltAffMapper,
                              boolean cpyOnGet,
                              boolean storeVal,
                              boolean addDepInfo)

Parameters:
  `kernalCtx` - Kernal context.
  `dfltAffMapper` - Default affinity mapper.
  `cpyOnGet` - Copy on get flag.
  `storeVal` - `True` if should store unmarshalled value in cache.
  `addDepInfo` - `true` if deployment info should be associated with the objects of this cache.

### Method Detail

#### cacheName

    public String cacheName()

Returns:
  Cache name.

#### addDeploymentInfo

    public boolean addDeploymentInfo()

Specified by:
  `addDeploymentInfo` in interface `CacheObjectValueContext`
Returns:
  `True` if deployment info should be associated with the objects of this cache.

#### copyOnGet

    public boolean copyOnGet()

Specified by:
  `copyOnGet` in interface `CacheObjectValueContext`
Returns:
  Copy on get flag.

#### storeValue

    public boolean storeValue()

Specified by:
  `storeValue` in interface `CacheObjectValueContext`
Returns:
  `True` if should store unmarshalled value in cache.

#### defaultAffMapper

    public AffinityKeyMapper defaultAffMapper()

Returns:
  Default affinity mapper.

#### kernalContext

    public GridKernalContext kernalContext()

Specified by:
  `kernalContext` in interface `CacheObjectValueContext`
Returns:
  Kernal context.

#### binaryEnabled

    public boolean binaryEnabled()

Specified by:
  `binaryEnabled` in interface `CacheObjectValueContext`
Returns:
  Binary enabled flag.

#### unwrapBinaryIfNeeded

    public Object unwrapBinaryIfNeeded(Object o,
                                       boolean keepBinary,
                                       boolean cpy)

Parameters:
  `o` - Object to unwrap.
  `keepBinary` - Keep binary flag.
  `cpy` - Copy value flag.
Returns:
  Unwrapped object.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.6
Release Date | : September 11 2019