(K key, V v)
| 499 | } |
| 500 | |
| 501 | public synchronized V ioGetSet(K key, V v) throws IOException { |
| 502 | Objects.requireNonNull(v); |
| 503 | Long addr = map.get(key); |
| 504 | V ret = null; |
| 505 | if (addr != null) { |
| 506 | ret = fetch(addr, false, null).getValue(); |
| 507 | } |
| 508 | long newAddr = append(key, v); |
| 509 | map.put(key, newAddr); |
| 510 | return ret; |
| 511 | } |
| 512 | |
| 513 | /** |
| 514 | * Copy only live entries to another file. Blocks writes to this map |