Package org.apache.ignite.internal.cdc
Class CdcEventImpl
- java.lang.Object
-
- org.apache.ignite.internal.cdc.CdcEventImpl
-
- All Implemented Interfaces:
Serializable,CdcEvent
public class CdcEventImpl extends Object implements CdcEvent
Event of single entry change. Instance presents new value of modified entry.- See Also:
CdcMain,CdcConsumer, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CdcEventImpl(Object key, Object val, boolean primary, int part, CacheEntryVersion ord, int cacheId, long expireTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcacheId()longexpireTime()Objectkey()intpartition()Ignite split dataset into smaller chunks to distribute them across the cluster.booleanprimary()StringtoString()Objectvalue()CacheEntryVersionversion()
-
-
-
Constructor Detail
-
CdcEventImpl
public CdcEventImpl(Object key, Object val, boolean primary, int part, CacheEntryVersion ord, int cacheId, long expireTime)
- Parameters:
key- Key.val- Value.primary-Trueif changes made on primary node.part- Partition.ord- Order of the entry change.cacheId- Cache id.expireTime- Expire time.
-
-
Method Detail
-
value
public Object value()
-
primary
public boolean primary()
- Specified by:
primaryin interfaceCdcEvent- Returns:
Trueif event fired on primary node for partition containing this entry.- See Also:
- Configuring partition backups.
-
partition
public int partition()
Ignite split dataset into smaller chunks to distribute them across the cluster.CdcConsumerimplementations can useCdcEvent.partition()to split changes processing in the same way as it done for the cache.- Specified by:
partitionin interfaceCdcEvent- Returns:
- Partition number.
- See Also:
Affinity.partition(Object),Affinity.partitions(), Data partitioning, Affinity collocation
-
version
public CacheEntryVersion version()
-
cacheId
public int cacheId()
- Specified by:
cacheIdin interfaceCdcEvent- Returns:
- Cache ID.
- See Also:
GridCacheUtils.cacheId(String),CacheView.cacheId()
-
expireTime
public long expireTime()
- Specified by:
expireTimein interfaceCdcEvent- Returns:
- Time when entry will be removed from cache. If
0then entry will be cached until removed. - See Also:
IgniteCache.withExpiryPolicy(ExpiryPolicy),CacheConfiguration.setExpiryPolicyFactory(Factory),GridCacheUtils.EXPIRE_TIME_ETERNAL
-
-