K
- the type of the keysV
- the type of the valuespublic class RecordingCacheWriter<K,V> extends Object implements javax.cache.integration.CacheWriter<K,V>, AutoCloseable
Constructor and Description |
---|
RecordingCacheWriter()
Constructs a RecordingCacheWriter.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the contents of stored values.
|
void |
close() |
void |
delete(Object key) |
void |
deleteAll(Collection<?> entries) |
V |
get(K key)
Gets the last written value of the specified key
|
long |
getDeleteCount()
Gets the number of deletes that have occurred.
|
long |
getWriteCount()
Gets the number of writes that have occurred.
|
boolean |
hasDeleted(K key)
Determines if this key was last deleted
|
boolean |
hasWritten(K key)
Determines if there is a last written value for the specified key
|
void |
write(javax.cache.Cache.Entry<? extends K,? extends V> entry) |
void |
writeAll(Collection<javax.cache.Cache.Entry<? extends K,? extends V>> entries) |
public RecordingCacheWriter()
public void writeAll(Collection<javax.cache.Cache.Entry<? extends K,? extends V>> entries)
public void delete(Object key)
public void deleteAll(Collection<?> entries)
public V get(K key)
key
- the keypublic boolean hasWritten(K key)
key
- the keypublic boolean hasDeleted(K key)
key
- the keypublic long getWriteCount()
public long getDeleteCount()
public void clear()
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2014. All Rights Reserved.