Class SyncResourceRegistry
java.lang.Object
com.linkedin.alpini.base.registry.ResourceRegistry
com.linkedin.alpini.base.registry.SyncResourceRegistry
- All Implemented Interfaces:
ResourceRegistry.Sync
,Shutdownable
,ShutdownableResource
public class SyncResourceRegistry
extends ResourceRegistry
implements ResourceRegistry.Sync, ShutdownableResource
-
Nested Class Summary
Nested classes/interfaces inherited from class com.linkedin.alpini.base.registry.ResourceRegistry
ResourceRegistry.Factory<R extends ShutdownableResource>, ResourceRegistry.ShutdownFirst, ResourceRegistry.ShutdownLast, ResourceRegistry.Sync
-
Field Summary
Fields inherited from class com.linkedin.alpini.base.registry.ResourceRegistry
_state, SHUTDOWN_THREAD_PREFIX
-
Constructor Summary
ConstructorDescriptionConstruct a ResourceRegistry class instance.SyncResourceRegistry
(boolean garbageCollectable) Construct a ResourceRegistry class instance. -
Method Summary
Methods inherited from class com.linkedin.alpini.base.registry.ResourceRegistry
factory, getGlobalShutdownDelayMillis, globalShutdown, isFactoryInterface, isShutdown, isTerminated, iterator, register, registerFactory, remove, setGlobalShutdownDelayMillis, shutdown, toString, vacuum, waitForShutdown, waitForShutdown, waitToStartShutdown, waitToStartShutdown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.linkedin.alpini.base.registry.Shutdownable
shutdown, waitForShutdown, waitForShutdown
Methods inherited from interface com.linkedin.alpini.base.registry.ShutdownableResource
isShutdown, isTerminated
-
Constructor Details
-
SyncResourceRegistry
public SyncResourceRegistry()Construct a ResourceRegistry class instance. When instances of theseResourceRegistry
are garbage collected when not shut down, they will automatically behave as-ifResourceRegistry.shutdown()
was invoked and a warning is emitted to the logs. -
SyncResourceRegistry
public SyncResourceRegistry(boolean garbageCollectable) Construct a ResourceRegistry class instance. Instances constructed with this constructor will not emit any log when it is garbage collected.- Parameters:
garbageCollectable
- If true, the ResourceRegistry will be shut down when no remaining references to the ResourceRegistry remain referenced.
-