MCPcopy Create free account
hub / github.com/traneio/future / save

Method save

future-java/src/main/java/io/trane/future/Local.java:98–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96 }
97
98 protected static final Optional<?>[] save() {
99 if (threadLocal == null)
100 return EMPTY;
101 else {
102 Optional<?>[] state = threadLocal.get();
103 if (state == null)
104 return EMPTY;
105 else
106 return state;
107 }
108 }
109
110 protected static final void restore(final Optional<?>[] saved) {
111 if (threadLocal != null)

Callers 4

saveAndRestoreMethod · 0.95
applyMethod · 0.95
createMethod · 0.95
becomeIfEmptyMethod · 0.95

Calls 1

getMethod · 0.65

Tested by 1

saveAndRestoreMethod · 0.76