Example usage for com.google.common.cache LoadingCache invalidate

List of usage examples for com.google.common.cache LoadingCache invalidate

Introduction

In this page you can find the example usage for com.google.common.cache LoadingCache invalidate.

Prototype

void invalidate(Object key);

Source Link

Document

Discards any cached value for key key .

Usage

From source file:org.waveprotocol.box.server.persistence.memory.MemorySnapshotStore.java

@Override
public void delete(WaveletName waveletName) throws PersistenceException {
    LoadingCache<WaveletId, MemorySnapshotAccess> waveData = access.getIfPresent(waveletName.waveId);
    if (waveData != null) {
        waveData.invalidate(waveletName.waveletId);
        if (waveData.size() == 0) {
            access.invalidate(waveletName.waveId);
        }// w ww.  j  a v a  2s.  c  o m
    }
}