use of org.apache.ignite.internal.processors.cache.mvcc.MvccUpdateVersionAware in project ignite by apache.
the class GridDhtPartitionSupplier method extractEntryInfo.
/**
* Extracts entry info from row.
*
* @param row Cache data row.
* @return Entry info.
*/
private GridCacheEntryInfo extractEntryInfo(CacheDataRow row) {
GridCacheEntryInfo info = grp.mvccEnabled() ? new GridCacheMvccEntryInfo() : new GridCacheEntryInfo();
info.key(row.key());
info.cacheId(row.cacheId());
if (grp.mvccEnabled()) {
assert row.mvccCoordinatorVersion() != MvccUtils.MVCC_CRD_COUNTER_NA;
// Rows from rebalance iterator have actual states already.
if (row.mvccTxState() != TxState.COMMITTED)
return null;
((MvccVersionAware) info).mvccVersion(row);
((GridCacheMvccEntryInfo) info).mvccTxState(TxState.COMMITTED);
if (row.newMvccCoordinatorVersion() != MvccUtils.MVCC_CRD_COUNTER_NA && row.newMvccTxState() == TxState.COMMITTED) {
((MvccUpdateVersionAware) info).newMvccVersion(row);
((GridCacheMvccEntryInfo) info).newMvccTxState(TxState.COMMITTED);
}
}
info.value(row.value());
info.version(row.version());
info.expireTime(row.expireTime());
return info;
}
Aggregations