org.apache.ignite.internal.processors.cache

## Class CacheEvictionEntry

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

All Implemented Interfaces:
  Serializable, Message

    public class CacheEvictionEntry
    extends Object
    implements Message

See Also:
  Serialized Form

### Field Summary

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

`DIRECT_TYPE_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`CacheEvictionEntry()` Required by `Message`.
`CacheEvictionEntry(KeyCacheObject key, GridCacheVersion ver, boolean near)`

### Method Summary

Methods
`short` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`void` `finishUnmarshal(GridCacheContext ctx, ClassLoader ldr)`
`KeyCacheObject` `key()`
`boolean` `near()`
`void` `onAckReceived()` Method called when ack message received.
`void` `prepareMarshal(GridCacheContext ctx)`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`GridCacheVersion` `version()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

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

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

### Constructor Detail

#### CacheEvictionEntry

    public CacheEvictionEntry()

Required by `Message`.

#### CacheEvictionEntry

    public CacheEvictionEntry(KeyCacheObject key,
                      GridCacheVersion ver,
                      boolean near)

Parameters:
  `key` - Key.
  `ver` - Version.
  `near` - `true` if key should be evicted from near cache.

### Method Detail

#### key

    public KeyCacheObject key()

Returns:
  Key.

#### version

    public GridCacheVersion version()

Returns:
  Version.

#### near

    public boolean near()

Returns:
  `True` if key should be evicted from near cache.

#### directType

    public short directType()

Gets message type.

Specified by:
  `directType` in interface `Message`
Returns:
  Message type.

#### prepareMarshal

    public void prepareMarshal(GridCacheContext ctx)
                        throws IgniteCheckedException

Parameters:
  `ctx` - Context.
Throws:
  `IgniteCheckedException` - If failed.

#### finishUnmarshal

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

Parameters:
  `ctx` - Context.
  `ldr` - Class loader.
Throws:
  `IgniteCheckedException` - If failed.

#### onAckReceived

    public void onAckReceived()

Method called when ack message received.

Specified by:
  `onAckReceived` in interface `Message`

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
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`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

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

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017