cleanup cache interface

This commit is contained in:
Xavier Léauté 2015-11-11 12:23:11 -08:00
parent fa6142e217
commit e26f7fca36
1 changed files with 8 additions and 8 deletions

View File

@ -30,8 +30,8 @@ import java.util.Map;
*/
public interface Cache
{
public byte[] get(NamedKey key);
public void put(NamedKey key, byte[] value);
byte[] get(NamedKey key);
void put(NamedKey key, byte[] value);
/**
* Resulting map should not contain any null values (i.e. cache misses should not be included)
@ -39,21 +39,21 @@ public interface Cache
* @param keys
* @return
*/
public Map<NamedKey, byte[]> getBulk(Iterable<NamedKey> keys);
Map<NamedKey, byte[]> getBulk(Iterable<NamedKey> keys);
public void close(String namespace);
void close(String namespace);
public CacheStats getStats();
CacheStats getStats();
public boolean isLocal();
boolean isLocal();
/**
* Custom metrics not covered by CacheStats may be emitted by this method.
* @param emitter The service emitter to emit on.
*/
public void doMonitor(ServiceEmitter emitter);
void doMonitor(ServiceEmitter emitter);
public class NamedKey
class NamedKey
{
final public String namespace;
final public byte[] key;