Package com.attivio.service
Class ZookeeperCuratorFrameworkBuilder
- java.lang.Object
-
- com.attivio.service.ZookeeperCuratorFrameworkBuilder
-
- All Implemented Interfaces:
CuratorFrameworkBuilder
public class ZookeeperCuratorFrameworkBuilder extends java.lang.Object implements CuratorFrameworkBuilder
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
basePrefix
static java.lang.String
clusteredPrefix
-
Fields inherited from interface com.attivio.service.CuratorFrameworkBuilder
AIE_ZOOKEEPER, CLIENT_BASED_SERVICES_PROPERTIES
-
-
Constructor Summary
Constructors Constructor Description ZookeeperCuratorFrameworkBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowProjectlessServices()
org.apache.curator.framework.CuratorFramework
curator(java.lang.String connectionString)
<T> java.lang.Class<?>
lookupClientBasedService(java.lang.Class<T> clazz)
Provides the builder an opportunity to return an implementation of the class if it was not found registered within Zookeeper.void
setProperties(java.util.Properties props)
Sets the properties for the builder.
-
-
-
Field Detail
-
basePrefix
public static final java.lang.String basePrefix
- See Also:
- Constant Field Values
-
clusteredPrefix
public static final java.lang.String clusteredPrefix
- See Also:
- Constant Field Values
-
-
Method Detail
-
curator
public org.apache.curator.framework.CuratorFramework curator(java.lang.String connectionString)
- Specified by:
curator
in interfaceCuratorFrameworkBuilder
- Returns:
- a connected CuratorFramework instance
-
lookupClientBasedService
public <T> java.lang.Class<?> lookupClientBasedService(java.lang.Class<T> clazz)
Description copied from interface:CuratorFrameworkBuilder
Provides the builder an opportunity to return an implementation of the class if it was not found registered within Zookeeper.- Specified by:
lookupClientBasedService
in interfaceCuratorFrameworkBuilder
- Returns:
- null or an alternative impl of
clazz
-
setProperties
public void setProperties(java.util.Properties props)
Sets the properties for the builder.- Specified by:
setProperties
in interfaceCuratorFrameworkBuilder
-
allowProjectlessServices
public boolean allowProjectlessServices()
- Specified by:
allowProjectlessServices
in interfaceCuratorFrameworkBuilder
- Returns:
- true if services unbound to a project can be returned. This is used by the test environment where mock and local services are created for unit tests with no projects deployed. See PLAT-39471
-
-