org.apache.ignite.internal.processors.cache

## Class CacheObjectContext

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

Direct Known Subclasses:
  CacheObjectPortableContext

    public class CacheObjectContext
    extends Object

### Constructor Summary

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

### Method Summary

Methods
`boolean` `addDeploymentInfo()`
`boolean` `copyOnGet()`
`AffinityKeyMapper` `defaultAffMapper()`
`GridKernalContext` `kernalContext()`
`boolean` `p2pEnabled()`
`IgniteCacheObjectProcessor` `processor()`
`boolean` `storeValue()`
`Object` `unwrapPortableIfNeeded(Object o, boolean keepPortable)`
`Object` `unwrapPortableIfNeeded(Object o, boolean keepPortable, boolean cpy)`
`Collection<Object>` `unwrapPortablesIfNeeded(Collection<Object> col, boolean keepPortable)`
`Collection<Object>` `unwrapPortablesIfNeeded(Collection<Object> col, boolean keepPortable, boolean cpy)`
`Object[]` `unwrapPortablesInArrayIfNeeded(Object[] arr, boolean keepPortable, boolean cpy)` Unwrap array of portables if needed.

### 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,
                      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

#### p2pEnabled

    public boolean p2pEnabled()

Returns:
  `True` if peer class loading is enabled.

#### addDeploymentInfo

    public boolean addDeploymentInfo()

Returns:
  `True` if deployment info should be associated with the objects of this cache.

#### copyOnGet

    public boolean copyOnGet()

Returns:
  Copy on get flag.

#### storeValue

    public boolean storeValue()

Returns:
  `True` if should store unmarshalled value in cache.

#### defaultAffMapper

    public AffinityKeyMapper defaultAffMapper()

Returns:
  Default affinity mapper.

#### kernalContext

    public GridKernalContext kernalContext()

Returns:
  Kernal context.

#### processor

    public IgniteCacheObjectProcessor processor()

Returns:
  Processor.

#### unwrapPortableIfNeeded

    public Object unwrapPortableIfNeeded(Object o,
                                boolean keepPortable)

Parameters:
  `o` - Object to unwrap.
  `keepPortable` - Keep binary flag.
Returns:
  Unwrapped object.

#### unwrapPortableIfNeeded

    public Object unwrapPortableIfNeeded(Object o,
                                boolean keepPortable,
                                boolean cpy)

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

#### unwrapPortablesIfNeeded

    public Collection<Object> unwrapPortablesIfNeeded(Collection<Object> col,
                                             boolean keepPortable)

Parameters:
  `col` - Collection of objects to unwrap.
  `keepPortable` - Keep binary flag.
Returns:
  Unwrapped collection.

#### unwrapPortablesIfNeeded

    public Collection<Object> unwrapPortablesIfNeeded(Collection<Object> col,
                                             boolean keepPortable,
                                             boolean cpy)

Parameters:
  `col` - Collection to unwrap.
  `keepPortable` - Keep binary flag.
  `cpy` - Copy value flag.
Returns:
  Unwrapped collection.

#### unwrapPortablesInArrayIfNeeded

    public Object[] unwrapPortablesInArrayIfNeeded(Object[] arr,
                                          boolean keepPortable,
                                          boolean cpy)

Unwrap array of portables if needed.

Parameters:
  `arr` - Array.
  `keepPortable` - Keep portable flag.
  `cpy` - Copy.
Returns:
  Result.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0-b1
Release Date | : December 1 2015