test_class.declarator: logger = LoggerFactory.getLogger(ZkBasedTreeNodeResourceTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(ZkBasedTreeNodeResourceTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.file: core/src/test/java/com/github/phantomthief/zookeeper/ZkBasedTreeNodeResourceTest.java
test_class.identifier: ZkBasedTreeNodeResourceTest
test_class.superclass: extends BaseTest
test_case.body: @Test
      void testClose() {
          ZkBasedTreeNodeResource<Map<String, String>> tree = ZkBasedTreeNodeResource
                  .<Map<String, String>> newBuilder()
                  .curator(curatorFramework)
                  .path("/test")
                  .factory(p -> p.entrySet().stream()
                          .collect(toMap(Entry::getKey, e -> new String(e.getValue().getData()))))
                  .build();
          System.out.println(tree.get());
          tree.close();
          assertThrows(IllegalStateException.class, tree::get);
      }
test_case.class_method_signature: ZkBasedTreeNodeResourceTest.testClose()
test_case.full_signature: @Test void testClose()
test_case.identifier: testClose
test_case.invocations: build factory path curator newBuilder collect stream entrySet toMap getData getValue println get close assertThrows
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void testClose()
focal_class.declarator: logger = getLogger(ZkBasedTreeNodeResource.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = getLogger(ZkBasedTreeNodeResource.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: lock = new Object()
focal_class.modifier: private final
focal_class.original_string: private final Object lock = new Object();
focal_class.type: Object
focal_class.var_name: lock
focal_class.declarator: factory
focal_class.modifier: private final
focal_class.original_string: private final ThrowableFunction<Map<String, ChildData>, T, Exception> factory;
focal_class.type: ThrowableFunction<Map<String, ChildData>, T, Exception>
focal_class.var_name: factory
focal_class.declarator: cleanup
focal_class.modifier: private final
focal_class.original_string: private final Predicate<T> cleanup;
focal_class.type: Predicate<T>
focal_class.var_name: cleanup
focal_class.declarator: waitStopPeriod
focal_class.modifier: private final
focal_class.original_string: private final long waitStopPeriod;
focal_class.type: long
focal_class.var_name: waitStopPeriod
focal_class.declarator: onResourceChange
focal_class.modifier: private final
focal_class.original_string: private final BiConsumer<T, T> onResourceChange;
focal_class.type: BiConsumer<T, T>
focal_class.var_name: onResourceChange
focal_class.declarator: curatorFrameworkFactory
focal_class.modifier: private final
focal_class.original_string: private final Supplier<CuratorFramework> curatorFrameworkFactory;
focal_class.type: Supplier<CuratorFramework>
focal_class.var_name: curatorFrameworkFactory
focal_class.declarator: path
focal_class.modifier: private final
focal_class.original_string: private final String path;
focal_class.type: String
focal_class.var_name: path
focal_class.declarator: treeCache
focal_class.modifier: @GuardedBy("lock")
      private volatile
focal_class.original_string: @GuardedBy("lock")
      private volatile TreeCache treeCache;
focal_class.type: TreeCache
focal_class.var_name: treeCache
focal_class.declarator: resource
focal_class.modifier: @GuardedBy("lock")
      private volatile
focal_class.original_string: @GuardedBy("lock")
      private volatile T resource;
focal_class.type: T
focal_class.var_name: resource
focal_class.declarator: closed
focal_class.modifier: @GuardedBy("lock")
      private volatile
focal_class.original_string: @GuardedBy("lock")
      private volatile boolean closed;
focal_class.type: boolean
focal_class.var_name: closed
focal_class.file: core/src/main/java/com/github/phantomthief/zookeeper/ZkBasedTreeNodeResource.java
focal_class.identifier: ZkBasedTreeNodeResource
focal_class.interfaces: implements Closeable
focal_class.class_method_signature: ZkBasedTreeNodeResource.ZkBasedTreeNodeResource(Builder<T> builder)
focal_class.full_signature: private  ZkBasedTreeNodeResource(Builder<T> builder)
focal_class.identifier: ZkBasedTreeNodeResource
focal_class.modifiers: private
focal_class.parameters: (Builder<T> builder)
focal_class.signature:  ZkBasedTreeNodeResource(Builder<T> builder)
focal_class.class_method_signature: ZkBasedTreeNodeResource.newBuilder()
focal_class.full_signature: public static Builder<T> newBuilder()
focal_class.identifier: newBuilder
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Builder<T>
focal_class.signature: Builder<T> newBuilder()
focal_class.class_method_signature: ZkBasedTreeNodeResource.ensureTreeCacheReady()
focal_class.full_signature: private void ensureTreeCacheReady()
focal_class.identifier: ensureTreeCacheReady
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void ensureTreeCacheReady()
focal_class.class_method_signature: ZkBasedTreeNodeResource.get()
focal_class.full_signature: public T get()
focal_class.identifier: get
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T get()
focal_class.class_method_signature: ZkBasedTreeNodeResource.checkClosed()
focal_class.full_signature: private void checkClosed()
focal_class.identifier: checkClosed
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void checkClosed()
focal_class.class_method_signature: ZkBasedTreeNodeResource.cleanup(T currentResource, T oldResource)
focal_class.full_signature: private void cleanup(T currentResource, T oldResource)
focal_class.identifier: cleanup
focal_class.modifiers: private
focal_class.parameters: (T currentResource, T oldResource)
focal_class.return: void
focal_class.signature: void cleanup(T currentResource, T oldResource)
focal_class.class_method_signature: ZkBasedTreeNodeResource.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: ZkBasedTreeNodeResource.isClosed()
focal_class.full_signature: public boolean isClosed()
focal_class.identifier: isClosed
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isClosed()
focal_class.class_method_signature: ZkBasedTreeNodeResource.doFactory()
focal_class.full_signature: private T doFactory()
focal_class.identifier: doFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T doFactory()
focal_class.class_method_signature: ZkBasedTreeNodeResource.generateFullTree(Map<String, ChildData> map, TreeCache cache, String rootPath)
focal_class.full_signature: private void generateFullTree(Map<String, ChildData> map, TreeCache cache, String rootPath)
focal_class.identifier: generateFullTree
focal_class.modifiers: private
focal_class.parameters: (Map<String, ChildData> map, TreeCache cache, String rootPath)
focal_class.return: void
focal_class.signature: void generateFullTree(Map<String, ChildData> map, TreeCache cache, String rootPath)
focal_method.body: @Override
      public void close() {
          synchronized (lock) {
              if (resource != null && cleanup != null) {
                  cleanup.test(resource);
              }
              if (treeCache != null) {
                  treeCache.close();
              }
              closed = true;
          }
      }
focal_method.class_method_signature: ZkBasedTreeNodeResource.close()
focal_method.full_signature: @Override public void close()
focal_method.identifier: close
focal_method.invocations: test close
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void close()