public final class SingletonAsserter extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
assertSingleton(Class clazz)
Check if a given class is instantiated only once.
|
static boolean |
assertSingleton(String scopeId,
Class clazz)
Check if given class is singleton within a particular environment or scope.
|
public static boolean assertSingleton(Class clazz)
clazz
- Class to check.public static boolean assertSingleton(String scopeId, Class clazz)
scopeId
- Environment id, e.g. Driver name or REEF job id.clazz
- Class that must have no more than 1 instance in that environment.Copyright © 2017 The Apache Software Foundation. All rights reserved.