com.maxifier.mxcache.storage.ObjectStorage Maven / Gradle / Ivy
/*
* Copyright (c) 2008-2014 Maxifier Ltd. All Rights Reserved.
*/
package com.maxifier.mxcache.storage;
/**
* THIS IS GENERATED CLASS! DON'T EDIT IT MANUALLY!
*
* GENERATED FROM P2OStorage.template
*
*
* This is a basic implementation of cache storage. It is very similar to a usual map.
* It supports two main operations: load and save for corresponding key and value types.
*
*
* @author Andrey Yakoushin ([email protected])
* @author Alexander Kochurov ([email protected])
*/
public interface ObjectStorage extends Storage {
/**
* This method should extract value for given key from internal representation.
* It is guaranteed that it would be called with corresponding lock held.
*
* @return {@link Storage#UNDEFINED} if no value for key exists, value itself if it's set for given key.
*/
Object load();
/**
* Saves a value to cache.
* It is guaranteed that it would be called with corresponding lock held.
*
* @param value cache value
*/
void save(F value);
}