org.apache.ignite.internal.processors.cache.distributed

## Class GridCacheTtlUpdateRequest

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheMessage
  - - org.apache.ignite.internal.processors.cache.GridCacheIdMessage
    - - org.apache.ignite.internal.processors.cache.distributed.GridCacheTtlUpdateRequest

All Implemented Interfaces:
  Serializable, Message

    public class GridCacheTtlUpdateRequest
    extends GridCacheIdMessage

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage

`cacheId`

### Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage

`addDepInfo, CACHE_MSG_INDEX_FIELD_NAME, forceAddDepInfo, MAX_CACHE_MSG_LOOKUP_INDEX`

### Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message

`DIRECT_TYPE_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`GridCacheTtlUpdateRequest()` Required empty constructor.
`GridCacheTtlUpdateRequest(int cacheId, AffinityTopologyVersion topVer, long ttl)`

### Method Summary

Methods
`boolean` `addDeploymentInfo()` Deployment enabled flag indicates whether deployment info has to be added to this message.
`void` `addEntry(KeyCacheObject key, GridCacheVersion ver)`
`void` `addNearEntry(KeyCacheObject key, GridCacheVersion ver)`
`short` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`void` `finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr)` This method is called after the message is deserialized and is responsible for unmarshalling state marshalled in `GridCacheMessage.prepareMarshal(GridCacheSharedContext)` method.
`List<KeyCacheObject>` `keys()`
`List<KeyCacheObject>` `nearKeys()`
`List<GridCacheVersion>` `nearVersions()`
`void` `prepareMarshal(GridCacheSharedContext ctx)` This method is called before the whole message is serialized and is responsible for pre-marshalling state.
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`AffinityTopologyVersion` `topologyVersion()` Gets topology version or -1 in case of topology version is not required for this message.
`String` `toString()`
`long` `ttl()`
`GridCacheVersion` `version(int idx)`
`List<GridCacheVersion>` `versions()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

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

`cacheGroupMessage, cacheId, cacheId, handlerId`

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

`appendFlag, classError, deployInfo, error, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, messageLogger, nextIndexId, onAckReceived, onClassError, partition, partitionExchangeMessage, prepare, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, prepareObject, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx`

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

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

### Constructor Detail

#### GridCacheTtlUpdateRequest

    public GridCacheTtlUpdateRequest()

Required empty constructor.

#### GridCacheTtlUpdateRequest

    public GridCacheTtlUpdateRequest(int cacheId,
                             AffinityTopologyVersion topVer,
                             long ttl)

Parameters:
  `cacheId` - Cache ID.
  `topVer` - Topology version.
  `ttl` - TTL.

### Method Detail

#### topologyVersion

    public AffinityTopologyVersion topologyVersion()

Description copied from class: `GridCacheMessage`
Gets topology version or -1 in case of topology version is not required for this message.

Overrides:
  `topologyVersion` in class `GridCacheMessage`
Returns:
  Topology version.

#### ttl

    public long ttl()

Returns:
  TTL.

#### addEntry

    public void addEntry(KeyCacheObject key,
                GridCacheVersion ver)

Parameters:
  `key` - Key.
  `ver` - Version.

#### addNearEntry

    public void addNearEntry(KeyCacheObject key,
                    GridCacheVersion ver)

Parameters:
  `key` - Key.
  `ver` - Version.

#### keys

    public List<KeyCacheObject> keys()

Returns:
  Keys.

#### versions

    public List<GridCacheVersion> versions()

Returns:
  Versions.

#### version

    public GridCacheVersion version(int idx)

Parameters:
  `idx` - Entry index.
Returns:
  Version.

#### nearKeys

    public List<KeyCacheObject> nearKeys()

Returns:
  Keys for near cache.

#### nearVersions

    public List<GridCacheVersion> nearVersions()

Returns:
  Versions for near cache entries.

#### prepareMarshal

    public void prepareMarshal(GridCacheSharedContext ctx)
                        throws IgniteCheckedException

This method is called before the whole message is serialized and is responsible for pre-marshalling state.

Overrides:
  `prepareMarshal` in class `GridCacheMessage`
Parameters:
  `ctx` - Cache context.
Throws:
  `IgniteCheckedException` - If failed.

#### finishUnmarshal

    public void finishUnmarshal(GridCacheSharedContext ctx,
                       ClassLoader ldr)
                         throws IgniteCheckedException

This method is called after the message is deserialized and is responsible for unmarshalling state marshalled in `GridCacheMessage.prepareMarshal(GridCacheSharedContext)` method.

Overrides:
  `finishUnmarshal` in class `GridCacheMessage`
Parameters:
  `ctx` - Context.
  `ldr` - Class loader.
Throws:
  `IgniteCheckedException` - If failed.

#### addDeploymentInfo

    public boolean addDeploymentInfo()

Deployment enabled flag indicates whether deployment info has to be added to this message.

Specified by:
  `addDeploymentInfo` in class `GridCacheMessage`
Returns:
  `true` or if deployment info must be added to the the message, `false` otherwise.

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
Overrides:
  `writeTo` in class `GridCacheIdMessage`
Parameters:
  `buf` - Byte buffer.
  `writer` - Writer.
Returns:
  Whether message was fully written.

#### readFrom

    public boolean readFrom(ByteBuffer buf,
                   MessageReader reader)

Reads this message from provided byte buffer.

Specified by:
  `readFrom` in interface `Message`
Overrides:
  `readFrom` in class `GridCacheIdMessage`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### directType

    public short directType()

Gets message type.

Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

Specified by:
  `fieldsCount` in interface `Message`
Overrides:
  `fieldsCount` in class `GridCacheIdMessage`
Returns:
  Fields count.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCacheIdMessage`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.2.0
Release Date | : September 15 2017