Package com.linkedin.alpini.base.test
Class ResourceRegistryTestBase
- java.lang.Object
-
- com.linkedin.alpini.base.test.ResourceRegistryTestBase
-
public abstract class ResourceRegistryTestBase extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ThreadLocal<ResourceRegistry>
REGISTRY_THREAD_LOCAL
-
Constructor Summary
Constructors Constructor Description ResourceRegistryTestBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R extends ShutdownableResource,F extends ResourceRegistry.Factory<R>>
Ffactory(java.lang.Class<F> clazz)
<R extends Shutdownable>
Rregister(R resource)
void
removeResourceRegistryThreadLocal()
void
setResourceRegistryThreadLocal()
void
shutdownResourceRegistry()
-
-
-
Field Detail
-
REGISTRY_THREAD_LOCAL
public static final java.lang.ThreadLocal<ResourceRegistry> REGISTRY_THREAD_LOCAL
-
-
Method Detail
-
factory
public <R extends ShutdownableResource,F extends ResourceRegistry.Factory<R>> F factory(java.lang.Class<F> clazz)
-
register
public <R extends Shutdownable> R register(R resource)
-
register
public <R extends SyncShutdownable> R register(R resource)
-
setResourceRegistryThreadLocal
@BeforeMethod(alwaysRun=true) public void setResourceRegistryThreadLocal()
-
removeResourceRegistryThreadLocal
@AfterMethod(alwaysRun=true) public void removeResourceRegistryThreadLocal()
-
shutdownResourceRegistry
@AfterClass(alwaysRun=true) public void shutdownResourceRegistry() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-