test_class.declarator: CACHE_EXPIRY = TimeUnit.SECONDS.toMillis(2)
test_class.modifier: private static final
test_class.original_string: private static final long CACHE_EXPIRY = TimeUnit.SECONDS.toMillis(2);
test_class.type: long
test_class.var_name: CACHE_EXPIRY
test_class.declarator: CACHE_ACTION = () -> {
          byte[] array = new byte[8];
          new Random().nextBytes(array);
          return new String(array, StandardCharsets.UTF_8);
      }
test_class.modifier: private static final
test_class.original_string: private static final Supplier<String> CACHE_ACTION = () -> {
          byte[] array = new byte[8];
          new Random().nextBytes(array);
          return new String(array, StandardCharsets.UTF_8);
      };
test_class.type: Supplier<String>
test_class.var_name: CACHE_ACTION
test_class.declarator: subject
test_class.modifier: private
test_class.original_string: private ExpiringCache<String> subject;
test_class.type: ExpiringCache<String>
test_class.var_name: subject
test_class.file: bundles/org.openhab.core/src/test/java/org/openhab/core/cache/ExpiringCacheTest.java
test_class.identifier: ExpiringCacheTest
test_case.body: @Test
      public void testPutValue() {
          String value1 = subject.getValue();
  
          // put new value
          subject.putValue("test");
  
          String value2 = subject.getValue();
          assertEquals("test", value2);
          assertNotEquals(value1, value2);
      }
test_case.class_method_signature: ExpiringCacheTest.testPutValue()
test_case.full_signature: @Test public void testPutValue()
test_case.identifier: testPutValue
test_case.invocations: getValue putValue getValue assertEquals assertNotEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPutValue()
focal_class.declarator: expiry
focal_class.modifier: private final
focal_class.original_string: private final long expiry;
focal_class.type: long
focal_class.var_name: expiry
focal_class.declarator: action
focal_class.modifier: private final
focal_class.original_string: private final Supplier<@Nullable V> action;
focal_class.type: Supplier<@Nullable V>
focal_class.var_name: action
focal_class.declarator: value = new SoftReference<>(null)
focal_class.modifier: private
focal_class.original_string: private SoftReference<@Nullable V> value = new SoftReference<>(null);
focal_class.type: SoftReference<@Nullable V>
focal_class.var_name: value
focal_class.declarator: expiresAt
focal_class.modifier: private
focal_class.original_string: private long expiresAt;
focal_class.type: long
focal_class.var_name: expiresAt
focal_class.file: bundles/org.openhab.core/src/main/java/org/openhab/core/cache/ExpiringCache.java
focal_class.identifier: ExpiringCache
focal_class.class_method_signature: ExpiringCache.ExpiringCache(Duration expiry, Supplier<@Nullable V> action)
focal_class.full_signature: public  ExpiringCache(Duration expiry, Supplier<@Nullable V> action)
focal_class.identifier: ExpiringCache
focal_class.modifiers: public
focal_class.parameters: (Duration expiry, Supplier<@Nullable V> action)
focal_class.signature:  ExpiringCache(Duration expiry, Supplier<@Nullable V> action)
focal_class.class_method_signature: ExpiringCache.ExpiringCache(long expiry, Supplier<@Nullable V> action)
focal_class.full_signature: public  ExpiringCache(long expiry, Supplier<@Nullable V> action)
focal_class.identifier: ExpiringCache
focal_class.modifiers: public
focal_class.parameters: (long expiry, Supplier<@Nullable V> action)
focal_class.signature:  ExpiringCache(long expiry, Supplier<@Nullable V> action)
focal_class.class_method_signature: ExpiringCache.getValue()
focal_class.full_signature: public synchronized @Nullable V getValue()
focal_class.identifier: getValue
focal_class.modifiers: public synchronized @Nullable
focal_class.parameters: ()
focal_class.return: V
focal_class.signature: V getValue()
focal_class.class_method_signature: ExpiringCache.putValue(@Nullable V value)
focal_class.full_signature: public final synchronized void putValue(@Nullable V value)
focal_class.identifier: putValue
focal_class.modifiers: public final synchronized
focal_class.parameters: (@Nullable V value)
focal_class.return: void
focal_class.signature: void putValue(@Nullable V value)
focal_class.class_method_signature: ExpiringCache.invalidateValue()
focal_class.full_signature: public final synchronized void invalidateValue()
focal_class.identifier: invalidateValue
focal_class.modifiers: public final synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void invalidateValue()
focal_class.class_method_signature: ExpiringCache.refreshValue()
focal_class.full_signature: public synchronized @Nullable V refreshValue()
focal_class.identifier: refreshValue
focal_class.modifiers: public synchronized @Nullable
focal_class.parameters: ()
focal_class.return: V
focal_class.signature: V refreshValue()
focal_class.class_method_signature: ExpiringCache.isExpired()
focal_class.full_signature: public boolean isExpired()
focal_class.identifier: isExpired
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isExpired()
focal_class.class_method_signature: ExpiringCache.calcExpiresAt()
focal_class.full_signature: private long calcExpiresAt()
focal_class.identifier: calcExpiresAt
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long calcExpiresAt()
focal_method.body: public final synchronized void putValue(@Nullable V value) {
          this.value = new SoftReference<>(value);
          expiresAt = calcExpiresAt();
      }
focal_method.class_method_signature: ExpiringCache.putValue(@Nullable V value)
focal_method.full_signature: public final synchronized void putValue(@Nullable V value)
focal_method.identifier: putValue
focal_method.invocations: calcExpiresAt
focal_method.modifiers: public final synchronized
focal_method.parameters: (@Nullable V value)
focal_method.return: void
focal_method.signature: void putValue(@Nullable V value)