Home
last modified time | relevance | path

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

/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DSharedResourcePool.java23 private final SharedResourceHolder.Resource<T> resource;
25 private SharedResourcePool(SharedResourceHolder.Resource<T> resource) { in SharedResourcePool()
29 public static <T> SharedResourcePool<T> forResource(SharedResourceHolder.Resource<T> resource) { in forResource()
35 return SharedResourceHolder.get(resource); in getObject()
41 SharedResourceHolder.release(resource, (T) object); in returnObject()
DSharedResourceHolder.java42 public final class SharedResourceHolder { class
46 private static final SharedResourceHolder holder = new SharedResourceHolder(
63 SharedResourceHolder(ScheduledExecutorFactory destroyerFactory) { in SharedResourceHolder() method in SharedResourceHolder
142 synchronized (SharedResourceHolder.this) { in releaseInternal()
DDnsNameResolver.java29 import io.grpc.internal.SharedResourceHolder.Resource;
167 executor = SharedResourceHolder.get(executorResource); in start()
276 executor = SharedResourceHolder.release(executorResource, executor); in shutdown()
DGrpcUtil.java42 import io.grpc.internal.SharedResourceHolder.Resource;
/external/grpc-grpc-java/core/src/test/java/io/grpc/inprocess/
DInProcessChannelBuilderTest.java24 import io.grpc.internal.SharedResourceHolder;
40 SharedResourceHolder.get(TIMER_SERVICE), in scheduledExecutorService_default()
43 SharedResourceHolder.release( in scheduledExecutorService_default()
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DSharedResourceHolderTest.java31 import io.grpc.internal.SharedResourceHolder.Resource;
51 private SharedResourceHolder holder;
74 holder = new SharedResourceHolder(new MockExecutorFactory()); in setUp()
98 assertEquals(SharedResourceHolder.DESTROY_DELAY_SECONDS, in destroyResourceWhenRefCountReachesZero()
114 assertEquals(SharedResourceHolder.DESTROY_DELAY_SECONDS, in destroyResourceWhenRefCountReachesZero()
177 SharedResourceHolder.ScheduledExecutorFactory {
DDnsNameResolverTest.java42 import io.grpc.internal.SharedResourceHolder.Resource;
/external/grpc-grpc-java/core/src/main/java/io/grpc/inprocess/
DInProcessChannelBuilder.java27 import io.grpc.internal.SharedResourceHolder;
168 ? SharedResourceHolder.get(GrpcUtil.TIMER_SERVICE) : scheduledExecutorService; in InProcessClientTransportFactory()
192 SharedResourceHolder.release(GrpcUtil.TIMER_SERVICE, timerService); in close()
/external/grpc-grpc-java/cronet/src/test/java/io/grpc/cronet/
DCronetChannelBuilderTest.java31 import io.grpc.internal.SharedResourceHolder;
89 SharedResourceHolder.get(TIMER_SERVICE), in scheduledExecutorService_default()
92 SharedResourceHolder.release( in scheduledExecutorService_default()
/external/grpc-grpc-java/okhttp/src/main/java/io/grpc/okhttp/
DOkHttpChannelBuilder.java36 import io.grpc.internal.SharedResourceHolder;
37 import io.grpc.internal.SharedResourceHolder.Resource;
496 ? SharedResourceHolder.get(GrpcUtil.TIMER_SERVICE) : timeoutService; in OkHttpTransportFactory()
511 this.executor = SharedResourceHolder.get(SHARED_EXECUTOR); in OkHttpTransportFactory()
563 SharedResourceHolder.release(GrpcUtil.TIMER_SERVICE, timeoutService); in close()
567 SharedResourceHolder.release(SHARED_EXECUTOR, (ExecutorService) executor); in close()
DOkHttpClientTransport.java55 import io.grpc.internal.SharedResourceHolder;
417 scheduler = SharedResourceHolder.get(TIMER_SERVICE); in start()
842 scheduler = SharedResourceHolder.release(TIMER_SERVICE, scheduler); in stopIfNecessary()
/external/grpc-grpc-java/okhttp/src/test/java/io/grpc/okhttp/
DOkHttpChannelBuilderTest.java30 import io.grpc.internal.SharedResourceHolder;
141 SharedResourceHolder.get(TIMER_SERVICE), in scheduledExecutorService_default()
144 SharedResourceHolder.release( in scheduledExecutorService_default()
/external/grpc-grpc-java/netty/src/main/java/io/grpc/netty/
DNettyServer.java38 import io.grpc.internal.SharedResourceHolder;
297 bossGroup = SharedResourceHolder.get(Utils.DEFAULT_BOSS_EVENT_LOOP_GROUP); in allocateSharedGroups()
300 workerGroup = SharedResourceHolder.get(Utils.DEFAULT_WORKER_EVENT_LOOP_GROUP); in allocateSharedGroups()
322 SharedResourceHolder.release(Utils.DEFAULT_BOSS_EVENT_LOOP_GROUP, bossGroup); in deallocate()
328 SharedResourceHolder.release(Utils.DEFAULT_WORKER_EVENT_LOOP_GROUP, workerGroup); in deallocate()
DNettyChannelBuilder.java40 import io.grpc.internal.SharedResourceHolder;
522 this.group = SharedResourceHolder.get(Utils.DEFAULT_WORKER_EVENT_LOOP_GROUP); in NettyTransportFactory()
573 SharedResourceHolder.release(Utils.DEFAULT_WORKER_EVENT_LOOP_GROUP, group); in close()
DUtils.java33 import io.grpc.internal.SharedResourceHolder.Resource;
/external/grpc-grpc-java/cronet/src/main/java/io/grpc/cronet/
DCronetChannelBuilder.java34 import io.grpc.internal.SharedResourceHolder;
222 ? SharedResourceHolder.get(GrpcUtil.TIMER_SERVICE) : timeoutService; in CronetTransportFactory()
246 SharedResourceHolder.release(GrpcUtil.TIMER_SERVICE, timeoutService); in close()
/external/grpc-grpc-java/alts/src/main/java/io/grpc/alts/
DGoogleDefaultChannelBuilder.java40 import io.grpc.internal.SharedResourceHolder;
112 SharedResourceHolder.get(HandshakerServiceChannel.SHARED_HANDSHAKER_CHANNEL); in buildProtocolNegotiator()
DHandshakerServiceChannel.java21 import io.grpc.internal.SharedResourceHolder.Resource;