MCPcopy
hub / github.com/oshi/oshi / get

Method get

oshi-core/src/main/java/oshi/util/Memoizer.java:80–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78 volatile long expirationNanos;
79
80 @Override
81 public T get() {
82 long nanos = expirationNanos;
83 long now = System.nanoTime();
84 if (nanos == 0 || (ttlNanos >= 0 && now - nanos >= 0)) {
85 synchronized (this) {
86 if (nanos == expirationNanos) { // recheck for lost race
87 T t = delegate.get();
88 value = t;
89 nanos = now + ttlNanos;
90 expirationNanos = (nanos == 0) ? 1 : nanos;
91 return t;
92 }
93 }
94 }
95 return value;
96 }
97 };
98 }
99

Callers 15

identifyVMMethod · 0.45
mainMethod · 0.45
getFileStoreForPathMethod · 0.45
parseProcessesMethod · 0.45
getOperatingSystemMethod · 0.45
getHardwareMethod · 0.45
getMicroarchitectureMethod · 0.45
getMatchingBitmaskMethod · 0.45
getAvailableMethod · 0.45
getTotalMethod · 0.45
getPageSizeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected