MCPcopy Create free account
hub / github.com/cschanck/single-file-java / ioSet

Method ioSet

src/main/java/org/sfj/ChiseledMap.java:495–499  ·  view source on GitHub ↗

Associate a key to a value @param key key value @param v value -- cannot be null. @return true if it replaced a value @throws IOException on exception

(K key, V v)

Source from the content-addressed store, hash-verified

493 * @throws IOException on exception
494 */
495 public synchronized boolean ioSet(K key, V v) throws IOException {
496 Objects.requireNonNull(v);
497 long newAddr = append(key, v);
498 return map.put(key, newAddr) != null;
499 }
500
501 public synchronized V ioGetSet(K key, V v) throws IOException {
502 Objects.requireNonNull(v);

Callers 4

test1KWritesMethod · 0.95
testIntsToIntsMethod · 0.95
snapshotMethod · 0.95
setMethod · 0.95

Calls 2

appendMethod · 0.95
putMethod · 0.45

Tested by 2

test1KWritesMethod · 0.76
testIntsToIntsMethod · 0.76