Lines Matching refs:key

374         String key = parts[1];  in readJournalLine()  local
376 lruEntries.remove(key); in readJournalLine()
380 Entry entry = lruEntries.get(key); in readJournalLine()
382 entry = new Entry(key); in readJournalLine()
383 lruEntries.put(key, entry); in readJournalLine()
444 writer.write(DIRTY + ' ' + entry.key + '\n'); in rebuildJournal()
446 writer.write(CLEAN + ' ' + entry.key + entry.getLengths() + '\n'); in rebuildJournal()
473 public synchronized Snapshot get(String key) throws IOException { in get() argument
475 validateKey(key); in get()
476 Entry entry = lruEntries.get(key); in get()
501 journalWriter.append(READ + ' ' + key + '\n'); in get()
506 return new Snapshot(key, entry.sequenceNumber, ins); in get()
513 public Editor edit(String key) throws IOException { in edit() argument
514 return edit(key, ANY_SEQUENCE_NUMBER); in edit()
517 private synchronized Editor edit(String key, long expectedSequenceNumber) throws IOException { in edit() argument
519 validateKey(key); in edit()
520 Entry entry = lruEntries.get(key); in edit()
526 entry = new Entry(key); in edit()
527 lruEntries.put(key, entry); in edit()
536 journalWriter.write(DIRTY + ' ' + key + '\n'); in edit()
601 journalWriter.write(CLEAN + ' ' + entry.key + entry.getLengths() + '\n'); in completeEdit()
606 lruEntries.remove(entry.key); in completeEdit()
607 journalWriter.write(REMOVE + ' ' + entry.key + '\n'); in completeEdit()
631 public synchronized boolean remove(String key) throws IOException { in remove() argument
633 validateKey(key); in remove()
634 Entry entry = lruEntries.get(key); in remove()
649 journalWriter.append(REMOVE + ' ' + key + '\n'); in remove()
650 lruEntries.remove(key); in remove()
716 private void validateKey(String key) { in validateKey() argument
717 if (key.contains(" ") || key.contains("\n") || key.contains("\r")) { in validateKey()
719 "keys must not contain spaces or newlines: \"" + key + "\""); in validateKey()
731 private final String key; field in DiskLruCache.Snapshot
735 private Snapshot(String key, long sequenceNumber, InputStream[] ins) { in Snapshot() argument
736 this.key = key; in Snapshot()
747 return DiskLruCache.this.edit(key, sequenceNumber); in edit()
843 remove(entry.key); // the previous entry is stale in commit()
897 private final String key; field in DiskLruCache.Entry
911 private Entry(String key) { in Entry() argument
912 this.key = key; in Entry()
946 return new File(directory, key + "." + i); in getCleanFile()
950 return new File(directory, key + "." + i + ".tmp"); in getDirtyFile()