Vladsz83 commented on code in PR #13447:
URL: https://github.com/apache/ignite/pull/13447#discussion_r3752644320
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryInfo.java:
##########
@@ -64,58 +68,70 @@ public class GridCacheEntryInfo implements
SelfMarshallingMessage, CacheIdAware
/** Deleted flag. */
private boolean deleted;
- /** {@inheritDoc} */
- @Override public int cacheId() {
- return cacheId;
- }
-
/**
- * @param cacheId Cache ID.
+ * Empty constructor for serialization purposes.
+ * see {@link #expireTimeDelta}.
*/
- public void cacheId(int cacheId) {
+ public GridCacheEntryInfo() {
+ initTime = U.currentTimeMillis();
+ }
+
+ /** */
+ public GridCacheEntryInfo(int cacheId, KeyCacheObject key, @Nullable
CacheObject val, GridCacheVersion ver, long expireTime, long ttl) {
+ assert expireTime >= 0;
+
+ if (expireTime != 0) {
+ initTime = U.currentTimeMillis();
+
+ expireTimeDelta = expireTime - initTime;
+
+ // In theory, here we can get the thread paused causing a negative
delta value. Possible negative values
Review Comment:
There is no expireTime any more
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]