Package com.attivio.service
Interface CuratorFrameworkBuilder
-
- All Known Implementing Classes:
ZookeeperCuratorFrameworkBuilder
public interface CuratorFrameworkBuilder
Implementations of this interface should not allocate resources within the constructor. The class may be instantiated many times.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AIE_ZOOKEEPER
the zookeeper connection string, a comma-separated list of host:portstatic java.lang.String
CLIENT_BASED_SERVICES_PROPERTIES
the path suffix to properties files that list services that are purely client-based.
-
Method Summary
All Methods Instance Methods Abstract 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
-
AIE_ZOOKEEPER
static final java.lang.String AIE_ZOOKEEPER
the zookeeper connection string, a comma-separated list of host:port- See Also:
- Constant Field Values
-
CLIENT_BASED_SERVICES_PROPERTIES
static final java.lang.String CLIENT_BASED_SERVICES_PROPERTIES
the path suffix to properties files that list services that are purely client-based. if the system is running in unclustered mode it will be prefixed withunclustered.
, otherwise it will be prefixed withclustered
.- See Also:
- Constant Field Values
-
-
Method Detail
-
curator
org.apache.curator.framework.CuratorFramework curator(java.lang.String connectionString)
- Parameters:
connectionString
-- Returns:
- a connected CuratorFramework instance
-
setProperties
void setProperties(java.util.Properties props)
Sets the properties for the builder.- Parameters:
props
-
-
allowProjectlessServices
boolean allowProjectlessServices()
- 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
-
lookupClientBasedService
<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.- Parameters:
clazz
-- Returns:
- null or an alternative impl of
clazz
-
-