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

## Class GridCacheTtlUpdateRequest<K,V>

- java.lang.Object
- - org.apache.ignite.plugin.extensions.communication.MessageAdapter
  - - org.apache.ignite.internal.processors.cache.GridCacheMessage<K,V>
    - - org.apache.ignite.internal.processors.cache.distributed.GridCacheTtlUpdateRequest<K,V>

All Implemented Interfaces:
  Serializable

    public class GridCacheTtlUpdateRequest<K,V>
    extends GridCacheMessage<K,V>

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.ignite.plugin.extensions.communication.MessageAdapter

`MessageAdapter.Type`

### Field Summary

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

`CACHE_MSG_INDEX_FIELD_NAME, cacheId, MAX_CACHE_MSG_LOOKUP_INDEX`

### Fields inherited from class org.apache.ignite.plugin.extensions.communication.MessageAdapter

`reader, readState`

### Constructor Summary

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

### Method Summary

Methods
`void` `addEntry(byte[] keyBytes, GridCacheVersion ver)`
`void` `addNearEntry(byte[] keyBytes, GridCacheVersion ver)`
`byte` `directType()` Gets message type.
`void` `finishUnmarshal(GridCacheSharedContext<K,V> 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<K>` `keys()`
`List<K>` `nearKeys()`
`List<GridCacheVersion>` `nearVersions()`
`boolean` `readFrom(ByteBuffer buf)` Reads this message from provided byte buffer.
`long` `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.GridCacheMessage

`allowForStartup, cacheId, cacheId, classError, deployInfo, ignoreClassErrors, lookupIndex, marshalBooleanLinkedMap, marshalCollection, marshalFilter, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, marshalValuesCollection, messageId, nextIndexId, onClassError, prepare, prepareFilter, prepareMarshal, prepareObject, prepareObjects, transactional, transferExpiryPolicy, unmarshalBooleanLinkedMap, unmarshalCollection, unmarshalFilter, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx, unmarshalValueBytesCollection`

### Methods inherited from class org.apache.ignite.plugin.extensions.communication.MessageAdapter

`setReader, skipRecovery`

### 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(long topVer,
                             long ttl)

Parameters:
  `topVer` - Topology version.
  `ttl` - TTL.

### Method Detail

#### topologyVersion

    public long 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<K,V>`
Returns:
  Topology version.

#### ttl

    public long ttl()

Returns:
  TTL.

#### addEntry

    public void addEntry(byte[] keyBytes,
                GridCacheVersion ver)

Parameters:
  `keyBytes` - Key bytes.
  `ver` - Version.

#### addNearEntry

    public void addNearEntry(byte[] keyBytes,
                    GridCacheVersion ver)

Parameters:
  `keyBytes` - Key bytes.
  `ver` - Version.

#### keys

    public List<K> 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<K> nearKeys()

Returns:
  Keys for near cache.

#### nearVersions

    public List<GridCacheVersion> nearVersions()

Returns:
  Versions for near cache entries.

#### finishUnmarshal

    public void finishUnmarshal(GridCacheSharedContext<K,V> 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<K,V>`
Parameters:
  `ctx` - Context.
  `ldr` - Class loader.
Throws:
  `IgniteCheckedException` - If failed.

#### directType

    public byte directType()

Gets message type.

Specified by:
  `directType` in class `MessageAdapter`
Returns:
  Message type.

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Overrides:
  `writeTo` in class `GridCacheMessage<K,V>`
Parameters:
  `buf` - Byte buffer.
  `writer` - Writer.
Returns:
  Whether message was fully written.

#### readFrom

    public boolean readFrom(ByteBuffer buf)

Reads this message from provided byte buffer.

Overrides:
  `readFrom` in class `GridCacheMessage<K,V>`
Parameters:
  `buf` - Byte buffer.
Returns:
  Whether message was fully read.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCacheMessage<K,V>`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015