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

org.infinispan.client.hotrod.impl.MetadataValueImpl Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
package org.infinispan.client.hotrod.impl;

import org.infinispan.client.hotrod.MetadataValue;

/**
 * MetadataValueImpl.
 *
 * @author Tristan Tarrant
 * @since 5.2
 */
public class MetadataValueImpl extends VersionedValueImpl implements MetadataValue {

   private final long created;
   private final int lifespan;
   private final long lastUsed;
   private final int maxIdle;

   public MetadataValueImpl(long created, int lifespan, long lastUsed, int maxIdle, long version, V value) {
      super(version, value);
      this.created = created;
      this.lifespan = lifespan;
      this.lastUsed = lastUsed;
      this.maxIdle = maxIdle;
   }

   @Override
   public long getCreated() {
      return created;
   }

   @Override
   public int getLifespan() {
      return lifespan;
   }

   @Override
   public long getLastUsed() {
      return lastUsed;
   }

   @Override
   public int getMaxIdle() {
      return maxIdle;
   }

   @Override
   public String toString() {
      return "MetadataValueImpl [created=" + created + ", lifespan=" + lifespan + ", lastUsed=" + lastUsed + ", maxIdle=" + maxIdle + ", getVersion()=" + getVersion()
            + ", getValue()=" + getValue() + "]";
   }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy