use of org.infinispan.metadata.Metadata in project indy by Commonjava.
the class ScheduleManager method getNextExpireTime.
private Date getNextExpireTime(final ScheduleKey cacheKey) {
return scheduleCache.execute(cache -> {
final CacheEntry entry = cache.getAdvancedCache().getCacheEntry(cacheKey);
if (entry != null) {
final Metadata metadata = entry.getMetadata();
long expire = metadata.lifespan();
final long startTimeInMillis = (Long) scheduleCache.get(cacheKey).get(SCHEDULE_TIME);
return calculateNextExpireTime(expire, startTimeInMillis);
}
return null;
});
}
Aggregations