All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.commons.time.TimeServiceTicker Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
package org.infinispan.commons.time;

import com.github.benmanes.caffeine.cache.Ticker;

/**
 * A Ticker for Caffeine backed by a TimeService
 * @author Tristan Tarrant <[email protected]>
 * @since 10.0
 **/
public class TimeServiceTicker implements Ticker {

   private final TimeService timeService;

   public TimeServiceTicker(TimeService timeService) {
      this.timeService = timeService;
   }

   @Override
   public long read() {
      return timeService.time();
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy