com.maxifier.mxcache.storage.elementlocked.ByteObjectElementLockedStorage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mxcache-runtime Show documentation
Show all versions of mxcache-runtime Show documentation
Constains all classes necessary for launching a MxCache-instrumentated application
/*
* 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 ByteObjectElementLockedStorage extends ByteObjectStorage, 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(byte key);
/**
* Unlocks the cache key
* @param key cache key
*/
void unlock(byte key);
}