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

com.googlecode.objectify.cache.spymemcached.SpyIdentifiableValue Maven / Gradle / Ivy

There is a newer version: 6.1.2
Show newest version
package com.googlecode.objectify.cache.spymemcached;

import com.googlecode.objectify.cache.IdentifiableValue;
import lombok.Data;
import net.spy.memcached.CASValue;

@Data
public class SpyIdentifiableValue implements IdentifiableValue {
	private final CASValue casValue;

	@Override
	public Object getValue() {
		return casValue.getValue();
	}

	@Override
	public IdentifiableValue withValue(final Object value) {
		return new SpyIdentifiableValue(new CASValue<>(casValue.getCas(), value));
	}
}