com.maxifier.mxcache.storage.elementlocked.IntObjectElementLockedStorage Maven / Gradle / Ivy
/*
* Copyright (c) 2008-2014 Maxifier Ltd. All Rights Reserved.
*/
package com.maxifier.mxcache.storage.elementlocked;
import 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 IntObjectElementLockedStorage extends IntObjectStorage, ElementLockedStorage {
/**
* This method should lock given cache key.
* If this key is already locked the method should wait for corresponding unlock call.
* This lock should be consistent with overall lock of this cache used for cleaning.
* It is not necessary to have per-key granularity of locks. It is allowed for this method to lock a
* group of keys at once, e.g. all with certain hash code of key or whatever else.
* @param key key
*/
void lock(int key);
/**
* Unlocks the cache key
* @param key cache key
*/
void unlock(int key);
}