|Modifier and Type||Method and Description|
Check if a given class is instantiated only once.
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.