Home
last modified time | relevance | path

Searched refs:ResourceInstance (Results 1 – 1 of 1) sorted by relevance

/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DSharedResourceHolderTest.java53 private static class ResourceInstance { class in SharedResourceHolderTest
57 private static class ResourceFactory implements Resource<ResourceInstance> {
59 public ResourceInstance create() { in create()
60 return new ResourceInstance(); in create()
64 public void close(ResourceInstance instance) { in close()
70 private static final Resource<ResourceInstance> SHARED_FOO = new ResourceFactory();
71 private static final Resource<ResourceInstance> SHARED_BAR = new ResourceFactory();
78 ResourceInstance foo1 = holder.getInternal(SHARED_FOO); in destroyResourceWhenRefCountReachesZero()
79 ResourceInstance sharedFoo = foo1; in destroyResourceWhenRefCountReachesZero()
80 ResourceInstance foo2 = holder.getInternal(SHARED_FOO); in destroyResourceWhenRefCountReachesZero()
[all …]