Search Results for

Show / Hide Table of Contents

# Class CacheEvent

In-memory database (cache) event.

##### Inheritance

System.Object
EventBase
CacheEvent

##### Implements

IEvent
IEquatable<EventBase>

##### Inherited Members

EventBase.Id
EventBase.LocalOrder
EventBase.Node
EventBase.Message
EventBase.Type
EventBase.Name
EventBase.Timestamp
EventBase.Equals(EventBase)
EventBase.Equals(Object)
EventBase.GetHashCode()
EventBase.ToString()
EventBase.ReadNode(IBinaryRawReader)

###### Namespace: Apache.Ignite.Core.Events

###### Assembly: Apache.Ignite.Core.dll

##### Syntax

    public sealed class CacheEvent : EventBase, IEvent, IEquatable<EventBase>

### Properties

#### CacheName

Gets cache name.

##### Declaration

    public string CacheName { get; }

##### Property Value

Type | Description
--- | ---
System.String |

#### ClosureClassName

Gets closure class name (applicable only for TRANSFORM operations).

##### Declaration

    public string ClosureClassName { get; }

##### Property Value

Type | Description
--- | ---
System.String |

#### EventNode

Gets node which initiated cache operation or null if that node is not available.

##### Declaration

    public IClusterNode EventNode { get; }

##### Property Value

Type | Description
--- | ---
IClusterNode |

#### HasNewValue

Gets flag indicating whether cache entry has new value in case if we only have new value in serialized form in which case NewValue will return null.

##### Declaration

    public bool HasNewValue { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### HasOldValue

Gets flag indicating whether cache entry has old value in case if we only have old value in serialized form in which case OldValue will return null.

##### Declaration

    public bool HasOldValue { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### IsNear

Gets flag indicating whether event happened on near or partitioned cache.

##### Declaration

    public bool IsNear { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### Key

Gets cache entry associated with event.

##### Declaration

    public object Key { get; }

##### Property Value

Type | Description
--- | ---
System.Object |

#### NewValue

Gets new value for this event.

##### Declaration

    public object NewValue { get; }

##### Property Value

Type | Description
--- | ---
System.Object |

#### OldValue

Gets old value associated with this event.

##### Declaration

    public object OldValue { get; }

##### Property Value

Type | Description
--- | ---
System.Object |

#### Partition

Gets partition for the event which is the partition the key belongs to.

##### Declaration

    public int Partition { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### SubjectId

Gets security subject ID initiated this cache event, if available. This property is available only for CacheObjectPut, CacheObjectRemoved and CacheObjectRead cache events. Subject ID will be set either to nodeId initiated cache update or read or client ID initiated cache update or read.

##### Declaration

    public Guid? SubjectId { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<Guid> |

#### TaskName

Gets task name if cache event was caused by an operation initiated within task execution.

##### Declaration

    public string TaskName { get; }

##### Property Value

Type | Description
--- | ---
System.String |

#### Xid

ID of surrounding cache cache transaction or null if there is no surrounding transaction.

##### Declaration

    public IgniteGuid? Xid { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<IgniteGuid> |

### Methods

#### ToShortString()

Gets shortened version of ToString result.

##### Declaration

    public override string ToShortString()

##### Returns

Type | Description
--- | ---
System.String |

##### Overrides

EventBase.ToShortString()

### Implements

IEvent
IEquatable<>