K
- key typeV
- value typepublic class BatchPartialSuccessRecordingClassWriter<K,V> extends RecordingCacheWriter<K,V>
Constructor and Description |
---|
BatchPartialSuccessRecordingClassWriter(int simulatedWriteFailure,
int simulatedDeleteFailure) |
Modifier and Type | Method and Description |
---|---|
void |
delete(Object key)
Some implementations may not call deleteAll.
|
void |
deleteAll(Collection<?> entries)
Always partial success.
|
void |
write(Cache.Entry<? extends K,? extends V> entry)
Some implementations may not call writeAll.
|
void |
writeAll(Collection<Cache.Entry<? extends K,? extends V>> entries)
Always partial success.
|
clear, close, get, getDeleteCount, getWriteCount, hasDeleted, hasWritten
public BatchPartialSuccessRecordingClassWriter(int simulatedWriteFailure, int simulatedDeleteFailure)
public void write(Cache.Entry<? extends K,? extends V> entry)
simulatedWriteFailure
times.write
in interface CacheWriter<K,V>
write
in class RecordingCacheWriter<K,V>
entry
- to writeCacheException
- to simulate partial failure of write-throughpublic void delete(Object key)
simulatedDeleteFailure
times.delete
in interface CacheWriter<K,V>
delete
in class RecordingCacheWriter<K,V>
key
- to deleteCacheException
- to simulate partial failure of write-throughpublic void writeAll(Collection<Cache.Entry<? extends K,? extends V>> entries)
writeAll
in interface CacheWriter<K,V>
writeAll
in class RecordingCacheWriter<K,V>
entries
- to write and upon return the entries that have not been written.CacheException
- to simulate partial success.public void deleteAll(Collection<?> entries)
deleteAll
in interface CacheWriter<K,V>
deleteAll
in class RecordingCacheWriter<K,V>
entries
- to deleteCacheException
- to simulate partial success.Copyright © 2014. All Rights Reserved.