org.apache.ignite.internal.processors.cache.portable

## Class CacheObjectPortableContext

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

    public class CacheObjectPortableContext
    extends CacheObjectContext

### Constructor Summary

Constructors
Constructor and Description
`CacheObjectPortableContext(GridKernalContext kernalCtx, boolean cpyOnGet, boolean storeVal, boolean portableEnabled)`

### Method Summary

Methods
`boolean` `portableEnabled()`
`Object` `unwrapPortableIfNeeded(Object o, boolean keepPortable)` Unwraps object.
`Collection<Object>` `unwrapPortablesIfNeeded(Collection<Object> col, boolean keepPortable)` Unwraps collection.
`Map<Object,Object>` `unwrapPortablesIfNeeded(Map<Object,Object> map, boolean keepPortable)` Unwraps map.

### Methods inherited from class org.apache.ignite.internal.processors.cache.CacheObjectContext

`copyOnGet, defaultAffMapper, kernalContext, p2pEnabled, processor, storeValue`

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

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

### Constructor Detail

#### CacheObjectPortableContext

    public CacheObjectPortableContext(GridKernalContext kernalCtx,
                              boolean cpyOnGet,
                              boolean storeVal,
                              boolean portableEnabled)

Parameters:
  `kernalCtx` - Kernal context.
  `portableEnabled` - Portable enabled flag.
  `cpyOnGet` - Copy on get flag.
  `storeVal` - `True` if should store unmarshalled value in cache.

### Method Detail

#### portableEnabled

    public boolean portableEnabled()

Returns:
  Portable enabled flag.

#### unwrapPortableIfNeeded

    public Object unwrapPortableIfNeeded(Object o,
                                boolean keepPortable)

Unwraps object.

Overrides:
  `unwrapPortableIfNeeded` in class `CacheObjectContext`
Parameters:
  `o` - Object to unwrap.
  `keepPortable` - Keep portable flag.
Returns:
  Unwrapped object.

#### unwrapPortablesIfNeeded

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

Unwraps collection.

Overrides:
  `unwrapPortablesIfNeeded` in class `CacheObjectContext`
Parameters:
  `col` - Collection to unwrap.
  `keepPortable` - Keep portable flag.
Returns:
  Unwrapped collection.

#### unwrapPortablesIfNeeded

    public Map<Object,Object> unwrapPortablesIfNeeded(Map<Object,Object> map,
                                             boolean keepPortable)

Unwraps map.

Parameters:
  `map` - Map to unwrap.
  `keepPortable` - Keep portable flag.
Returns:
  Unwrapped collection.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.4.0
Release Date | : September 24 2015