public interface FabricService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_REPO_URI |
Modifier and Type | Method and Description |
---|---|
<T> T |
adapt(java.lang.Class<T> type)
Adapt the
FabricService to another type |
java.lang.String |
containerWebAppURL(java.lang.String webAppId,
java.lang.String name)
Returns the web app URL for the given web application (from its id)
|
ContainerAutoScaler |
createContainerAutoScaler()
Creates a new
ContainerAutoScaler instance
using the available container providers to determine the best way to auto-scale;
or null if there are no suitable ContainerPRovider instances available
with the correct configuration to enable this capability. |
CreateContainerMetadata[] |
createContainers(CreateContainerOptions options)
Creates one or more new
Container s with the specified CreateContainerOptions . |
CreateContainerMetadata[] |
createContainers(CreateContainerOptions options,
CreationStateListener listener) |
Profile |
createProfile(java.lang.String version,
java.lang.String name)
Deprecated.
|
Version |
createVersion(java.lang.String version)
Creates a new
Version . |
Version |
createVersion(Version parent,
java.lang.String version)
|
void |
deleteProfile(Profile profile)
Deprecated.
Use Profile#delete() instead
|
void |
deleteVersion(java.lang.String version)
Deletes a
Version with the specified name. |
void |
destroyContainer(Container container) |
void |
destroyContainer(Container container,
boolean force) |
void |
destroyContainer(java.lang.String containerId) |
void |
destroyContainer(java.lang.String containerId,
boolean force) |
java.lang.String |
getConfigurationValue(java.lang.String versionId,
java.lang.String profileId,
java.lang.String pid,
java.lang.String key)
Returns the configuration value for the given key
|
Container |
getContainer(java.lang.String name)
Finds the
Container with the specified name. |
Container[] |
getContainers()
Gets the existing
Container s. |
Container |
getCurrentContainer()
Returns the
Container on which the method is executed. |
java.lang.String |
getCurrentContainerName()
Returns the name of the current
Container . |
DataStore |
getDataStore()
Get the
DataStore |
java.lang.String |
getDefaultJvmOptions()
Get the default JVM options used when creating containers
|
Version |
getDefaultVersion()
Returns the default
Version . |
java.lang.String |
getEnvironment() |
FabricStatus |
getFabricStatus()
Get the profile statuses of the fabric in terms of the current number of instances and their max/min requirements
|
java.net.URI |
getMavenRepoUploadURI()
Returns the current maven proxy repository to use to deploy new builds to the fabric
|
java.net.URI |
getMavenRepoURI()
Returns the current maven proxy repository to use to create new container
|
java.util.List<java.net.URI> |
getMavenRepoURIs() |
PatchService |
getPatchService()
Get the patch support service which allow easy upgrades
|
PortService |
getPortService()
Get hte port service.
|
Profile |
getProfile(java.lang.String version,
java.lang.String name)
Deprecated.
|
Profile[] |
getProfiles(java.lang.String version)
Deprecated.
|
ContainerProvider |
getProvider(java.lang.String scheme)
Lookup a container provider by name
|
FabricRequirements |
getRequirements()
Returns the fabric provisioning requirements if there are any defined
or empty requirements if none are defined.
|
java.util.Set<java.lang.Class<? extends CreateContainerBasicMetadata>> |
getSupportedCreateContainerMetadataTypes() |
java.util.Set<java.lang.Class<? extends CreateContainerBasicOptions>> |
getSupportedCreateContainerOptionTypes() |
Version |
getVersion(java.lang.String name)
Finds the
Version with the specified name. |
Version[] |
getVersions()
Returns all
Version s. |
java.lang.String |
getZookeeperPassword()
Returns the password used to connect to Zookeeper.
|
java.lang.String |
getZookeeperUrl()
Returns the pseudo url of the Zookeeper.
|
java.lang.String |
getZooKeeperUser()
Returns the user used to connect to Zookeeper.
|
boolean |
scaleProfile(java.lang.String profile,
int numberOfInstances)
Scales the given profile up or down in the number of instances required
|
void |
setConfigurationValue(java.lang.String versionId,
java.lang.String profileId,
java.lang.String pid,
java.lang.String key,
java.lang.String value)
Sets the configuration value for the given key
|
void |
setDefaultJvmOptions(java.lang.String jvmOptions)
Set the default JVM options used when creating containers
|
void |
setDefaultVersion(Version version)
Sets the default
Version . |
void |
setRequirements(FabricRequirements requirements)
Stores the fabric provisioning requirements
|
void |
startContainer(Container container) |
void |
startContainer(Container container,
boolean force) |
void |
startContainer(java.lang.String containerId) |
void |
startContainer(java.lang.String containerId,
boolean force) |
void |
stopContainer(Container container) |
void |
stopContainer(Container container,
boolean force) |
void |
stopContainer(java.lang.String containerId) |
void |
stopContainer(java.lang.String containerId,
boolean force) |
void |
substituteConfigurations(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> configurations) |
void |
trackConfiguration(java.lang.Runnable callback)
Track configuration changes.
|
void |
untrackConfiguration(java.lang.Runnable callback)
Un-Track configuration changes.
|
static final java.lang.String DEFAULT_REPO_URI
<T> T adapt(java.lang.Class<T> type)
FabricService
to another typejava.lang.String getEnvironment()
void substituteConfigurations(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> configurations)
void trackConfiguration(java.lang.Runnable callback)
callback
- The Callback to call when a configuration change is detected.void untrackConfiguration(java.lang.Runnable callback)
callback
- The Callback to ignore.Container[] getContainers()
Container
s.Container getContainer(java.lang.String name)
Container
with the specified name.void startContainer(java.lang.String containerId)
void startContainer(java.lang.String containerId, boolean force)
void startContainer(Container container)
void startContainer(Container container, boolean force)
void stopContainer(java.lang.String containerId)
void stopContainer(java.lang.String containerId, boolean force)
void stopContainer(Container container)
void stopContainer(Container container, boolean force)
void destroyContainer(java.lang.String containerId)
void destroyContainer(java.lang.String containerId, boolean force)
void destroyContainer(Container container)
void destroyContainer(Container container, boolean force)
CreateContainerMetadata[] createContainers(CreateContainerOptions options)
Container
s with the specified CreateContainerOptions
.options
- The options for the creation of the Container
.CreateContainerMetadata[] createContainers(CreateContainerOptions options, CreationStateListener listener)
java.util.Set<java.lang.Class<? extends CreateContainerBasicOptions>> getSupportedCreateContainerOptionTypes()
java.util.Set<java.lang.Class<? extends CreateContainerBasicMetadata>> getSupportedCreateContainerMetadataTypes()
void deleteVersion(java.lang.String version)
Version
with the specified name.version
- The name of the new Version
.ContainerProvider getProvider(java.lang.String scheme)
scheme
- the name of the container providerjava.net.URI getMavenRepoURI()
java.util.List<java.net.URI> getMavenRepoURIs()
java.net.URI getMavenRepoUploadURI()
java.lang.String getZookeeperUrl()
ip:port
java.lang.String getZooKeeperUser()
java.lang.String getZookeeperPassword()
@Deprecated Profile[] getProfiles(java.lang.String version)
Version.getProfiles()
@Deprecated Profile getProfile(java.lang.String version, java.lang.String name)
Version.getProfile(String)
@Deprecated Profile createProfile(java.lang.String version, java.lang.String name)
Version.createProfile(String)
@Deprecated void deleteProfile(Profile profile)
Profile
.Container getCurrentContainer()
Container
on which the method is executed.java.lang.String getCurrentContainerName()
Container
.FabricRequirements getRequirements()
void setRequirements(FabricRequirements requirements) throws java.io.IOException
java.io.IOException
FabricStatus getFabricStatus()
PatchService getPatchService()
PortService getPortService()
java.lang.String getDefaultJvmOptions()
void setDefaultJvmOptions(java.lang.String jvmOptions)
java.lang.String containerWebAppURL(java.lang.String webAppId, java.lang.String name)
java.lang.String getConfigurationValue(java.lang.String versionId, java.lang.String profileId, java.lang.String pid, java.lang.String key)
void setConfigurationValue(java.lang.String versionId, java.lang.String profileId, java.lang.String pid, java.lang.String key, java.lang.String value)
boolean scaleProfile(java.lang.String profile, int numberOfInstances) throws java.io.IOException
profile
- the profile ID to change the requirementsnumberOfInstances
- the number of instances to increase or decreasejava.io.IOException
ContainerAutoScaler createContainerAutoScaler()
ContainerAutoScaler
instance
using the available container providers to determine the best way to auto-scale;
or null if there are no suitable ContainerPRovider
instances available
with the correct configuration to enable this capability.Copyright © 2011-2014 Red Hat. All Rights Reserved.