Guava RemovalCause - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Guava RemovalCause class.

This code example shows how to use the following methods:equals
                                    return kb;
                                } 
                            }) 
                            .removalListener(new RemovalListener<String, File>() {
                                public void onRemoval(RemovalNotification<String, File> rn) {
                                    if (rn.getCause().equals(RemovalCause.REPLACED)) {
                                        /* don't delete replaced files */ 
                                        return; 
                                    } 
                                    removeFile(rn.getValue());
                                } 
                            }) 
                            .build(new CacheLoader<String, File>() {
                                public File load(String path) throws Exception {
                                    return downloadFile(path);
                                } 
                            }); 
 
        scanExistingFiles(); 
    } 
3
CodeRank