org.apache.ignite.internal.processors.cache

## Class CacheOperationContext

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

All Implemented Interfaces:
  Serializable

    public class CacheOperationContext
    extends Object
    implements Serializable

Cache operation context.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`CacheOperationContext()` Constructor with default values.
`CacheOperationContext(boolean skipStore, UUID subjId, boolean keepBinary, javax.cache.expiry.ExpiryPolicy expiryPlc, boolean noRetries, Byte dataCenterId)`

### Method Summary

Methods
`Byte` `dataCenterId()` Gets data center ID.
`javax.cache.expiry.ExpiryPolicy` `expiry()`
`CacheOperationContext` `forSubjectId(UUID subjId)` See `IgniteInternalCache.forSubjectId(UUID)`.
`boolean` `hasDataCenterId()`
`boolean` `isKeepBinary()`
`CacheOperationContext` `keepBinary()` See `IgniteInternalCache.keepBinary()`.
`boolean` `noRetries()`
`CacheOperationContext` `setNoRetries(boolean noRetries)`
`CacheOperationContext` `setSkipStore(boolean skipStore)` See `IgniteInternalCache.setSkipStore(boolean)`.
`boolean` `skipStore()`
`UUID` `subjectId()` Gets client ID for which this projection was created.
`String` `toString()`
`CacheOperationContext` `withExpiryPolicy(javax.cache.expiry.ExpiryPolicy plc)` See `IgniteInternalCache.withExpiryPolicy(ExpiryPolicy)`.

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

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

### Constructor Detail

#### CacheOperationContext

    public CacheOperationContext()

Constructor with default values.

#### CacheOperationContext

    public CacheOperationContext(boolean skipStore,
                         @Nullable
                         UUID subjId,
                         boolean keepBinary,
                         @Nullable
                         javax.cache.expiry.ExpiryPolicy expiryPlc,
                         boolean noRetries,
                         @Nullable
                         Byte dataCenterId)

Parameters:
  `skipStore` - Skip store flag.
  `subjId` - Subject ID.
  `keepBinary` - Keep binary flag.
  `expiryPlc` - Expiry policy.
  `dataCenterId` - Data center id.

### Method Detail

#### isKeepBinary

    public boolean isKeepBinary()

Returns:
  Keep binary flag.

#### hasDataCenterId

    public boolean hasDataCenterId()

Returns:
  `True` if data center id is set otherwise `false`.

#### keepBinary

    public CacheOperationContext keepBinary()

See `IgniteInternalCache.keepBinary()`.

Returns:
  New instance of CacheOperationContext with keep binary flag.

#### subjectId

    @Nullable
    public UUID subjectId()

Gets client ID for which this projection was created.

Returns:
  Client ID.

#### dataCenterId

    @Nullable
    public Byte dataCenterId()

Gets data center ID.

Returns:
  Client ID.

#### forSubjectId

    public CacheOperationContext forSubjectId(UUID subjId)

See `IgniteInternalCache.forSubjectId(UUID)`.

Parameters:
  `subjId` - Subject id.
Returns:
  New instance of CacheOperationContext with specific subject id.

#### skipStore

    public boolean skipStore()

Returns:
  Skip store.

#### setSkipStore

    public CacheOperationContext setSkipStore(boolean skipStore)

See `IgniteInternalCache.setSkipStore(boolean)`.

Parameters:
  `skipStore` - Skip store flag.
Returns:
  New instance of CacheOperationContext with skip store flag.

#### expiry

    @Nullable
    public javax.cache.expiry.ExpiryPolicy expiry()

Returns:
  `ExpiryPolicy` associated with this projection.

#### withExpiryPolicy

    public CacheOperationContext withExpiryPolicy(javax.cache.expiry.ExpiryPolicy plc)

See `IgniteInternalCache.withExpiryPolicy(ExpiryPolicy)`.

Parameters:
  `plc` - `ExpiryPolicy` to associate with this projection.
Returns:
  New instance of CacheOperationContext with skip store flag.

#### setNoRetries

    public CacheOperationContext setNoRetries(boolean noRetries)

Parameters:
  `noRetries` - No retries flag.
Returns:
  Operation context.

#### noRetries

    public boolean noRetries()

Returns:
  No retries flag.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.9.0
Release Date | : March 2 2017