EAC Components 3.2.2

com.endeca.soleng.eac.toolkit.component.cluster
Class ForgeCluster

java.lang.Object
  extended by com.endeca.soleng.eac.toolkit.base.EacElement
      extended by com.endeca.soleng.eac.toolkit.base.Provisionable
          extended by com.endeca.soleng.eac.toolkit.component.cluster.ForgeCluster

public class ForgeCluster
extends com.endeca.soleng.eac.toolkit.base.Provisionable


Field Summary
 
Fields inherited from class com.endeca.soleng.eac.toolkit.base.EacElement
appName, dataPrefix, eacHost, eacPort, elementId, lockManager, logDir, sslEnabled, workingDir
 
Constructor Summary
ForgeCluster()
          Default constructor.
 
Method Summary
 void addForge(ForgeComponent forge)
          Adds a forge to the group.
 void archiveLogDir()
           
 void archiveState()
           
 void cleanDirs()
           
 void getData()
           
 ForgeComponent getForgeById(java.lang.String forgeId)
          Retrieves the Forge with the specified ID from the group.
 java.util.List<java.lang.String> getForgeGroupNames()
          Retrieves a list of all the forge groups with which the group's forges are associated..
 java.util.Map<java.lang.String,java.util.List<ForgeComponent>> getForgeGroups()
          Retrieves a map, whose keys are the forge groups defined for the application, and whose values are lists of forges belonging to each forge group.
 java.util.List<ForgeComponent> getForges()
           
 java.util.List<ForgeComponent> getForgesInForgeGroup(java.lang.String forgeGroup)
          Retrieves a list of all forges belonging to the specified forge group.
 boolean isDefined()
          Checks whether the member forges in the group are defined.
 boolean isDefinitionChanged()
          Checks whether the member forges in the group have changed.
 boolean isGetDataInParallel()
           
 void removeDefinition()
          Removes the definition of each defined forge in the group.
 void run()
           
 void setCachedAppDefinition(com.endeca.eac.client.ApplicationType cachedAppDefinition)
           
 void setDefinition()
          Sets the definition of each forge in the group that is not already defined.
 void setForges(java.util.List<ForgeComponent> forges)
           
 void setGetDataInParallel(boolean getDataInParallel)
           
 void start()
           
 void stop()
           
 void updateDefinition()
          Updates the definition of each forge in the group.
 
Methods inherited from class com.endeca.soleng.eac.toolkit.base.Provisionable
getAppDefinitionFromEac, getCachedAppDefinition, getProvisioningPort, invalidateCachedAppDefinition
 
Methods inherited from class com.endeca.soleng.eac.toolkit.base.EacElement
getAppName, getDataPrefix, getEacHost, getEacPort, getElementId, getLockManager, getLogDir, getWorkingDir, isSslEnabled, setAppName, setDataPrefix, setEacHost, setEacPort, setElementId, setLockManager, setLogDir, setSslEnabled, setWorkingDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForgeCluster

public ForgeCluster()
Default constructor.

Method Detail

cleanDirs

public void cleanDirs()
               throws com.endeca.soleng.eac.toolkit.exception.AppConfigurationException,
                      com.endeca.soleng.eac.toolkit.exception.EacCommunicationException,
                      com.endeca.soleng.eac.toolkit.exception.EacComponentControlException,
                      java.lang.InterruptedException
Throws:
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
java.lang.InterruptedException

getData

public void getData()
             throws com.endeca.soleng.eac.toolkit.exception.AppConfigurationException,
                    com.endeca.soleng.eac.toolkit.exception.EacCommunicationException,
                    com.endeca.soleng.eac.toolkit.exception.EacComponentControlException,
                    java.lang.InterruptedException
Throws:
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
java.lang.InterruptedException

archiveLogDir

public void archiveLogDir()
                   throws com.endeca.soleng.eac.toolkit.exception.EacCommunicationException,
                          com.endeca.soleng.eac.toolkit.exception.EacComponentControlException,
                          java.lang.InterruptedException,
                          com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
java.lang.InterruptedException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException

archiveState

public void archiveState()
                  throws com.endeca.soleng.eac.toolkit.exception.AppConfigurationException,
                         com.endeca.soleng.eac.toolkit.exception.EacCommunicationException,
                         com.endeca.soleng.eac.toolkit.exception.EacComponentControlException,
                         java.lang.InterruptedException
Throws:
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
java.lang.InterruptedException

start

public void start()
           throws com.endeca.soleng.eac.toolkit.exception.EacCommunicationException,
                  com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException

stop

public void stop()
          throws com.endeca.soleng.eac.toolkit.exception.EacCommunicationException,
                 com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException

run

public void run()
         throws com.endeca.soleng.eac.toolkit.exception.EacCommunicationException,
                com.endeca.soleng.eac.toolkit.exception.EacComponentControlException,
                java.lang.InterruptedException,
                com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
java.lang.InterruptedException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException

isDefined

public boolean isDefined()
                  throws com.endeca.soleng.eac.toolkit.exception.EacCommunicationException,
                         com.endeca.soleng.eac.toolkit.exception.EacProvisioningException
Checks whether the member forges in the group are defined.

Specified by:
isDefined in class com.endeca.soleng.eac.toolkit.base.Provisionable
Returns:
Returns true if all forges are defined. Returns false if any forge is undefined.
Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException - If a communication error occurs while retrieving the provisioning port.
com.endeca.soleng.eac.toolkit.exception.EacProvisioningException - If an error occurs while trying to retrieve a component definition from the EAC.

isDefinitionChanged

public boolean isDefinitionChanged()
                            throws com.endeca.soleng.eac.toolkit.exception.EacCommunicationException,
                                   com.endeca.soleng.eac.toolkit.exception.EacProvisioningException
Checks whether the member forges in the group have changed.

Specified by:
isDefinitionChanged in class com.endeca.soleng.eac.toolkit.base.Provisionable
Returns:
Returns false if none of the forges have changed. Returns true if any of the member forges have changed.
Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException - If a communication error occurs while retrieving the provisioning port.
com.endeca.soleng.eac.toolkit.exception.EacProvisioningException - If an error occurs while trying to retrieve a component definition from the EAC.

removeDefinition

public void removeDefinition()
                      throws com.endeca.soleng.eac.toolkit.exception.EacCommunicationException,
                             com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
Removes the definition of each defined forge in the group. Any forge that has no associated definition in the EAC is ignored.

Specified by:
removeDefinition in class com.endeca.soleng.eac.toolkit.base.Provisionable
Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException - If a communication error occurs while retrieving the provisioning port.
com.endeca.soleng.eac.toolkit.exception.EacProvisioningException
com.endeca.soleng.eac.toolkit.exception.EacProvisioningException - If an error occurs while trying to retrieve a component definition from the EAC.
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException

setDefinition

public void setDefinition()
                   throws com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
Sets the definition of each forge in the group that is not already defined.

Specified by:
setDefinition in class com.endeca.soleng.eac.toolkit.base.Provisionable
Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException - If a communication error occurs while retrieving the provisioning port.

updateDefinition

public void updateDefinition()
                      throws com.endeca.soleng.eac.toolkit.exception.EacCommunicationException,
                             com.endeca.soleng.eac.toolkit.exception.EacComponentControlException,
                             com.endeca.soleng.eac.toolkit.exception.EacProvisioningException,
                             com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
Updates the definition of each forge in the group. If a forge has not changed, no action is taken.

Specified by:
updateDefinition in class com.endeca.soleng.eac.toolkit.base.Provisionable
Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException - If a communication error occurs while retrieving the provisioning port.
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.EacProvisioningException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException

getForges

public java.util.List<ForgeComponent> getForges()

getForgeById

public ForgeComponent getForgeById(java.lang.String forgeId)
Retrieves the Forge with the specified ID from the group.

Parameters:
forgeId - ID of the forge to retrieve.
Returns:
Returns the specified forge or null if none is found.

getForgeGroups

public java.util.Map<java.lang.String,java.util.List<ForgeComponent>> getForgeGroups()
Retrieves a map, whose keys are the forge groups defined for the application, and whose values are lists of forges belonging to each forge group. If no forge groups are defined, the map will contain an auto-generated key for each forge and a single forge per forge group. That is, each forge will be assigned to its own forge group.

Returns:
Returns a map of forge groups and a list of forges assigned to each group.

getForgesInForgeGroup

public java.util.List<ForgeComponent> getForgesInForgeGroup(java.lang.String forgeGroup)
Retrieves a list of all forges belonging to the specified forge group.

Parameters:
forgeGroup - Name of the forge group whose member forges should be retrieved.
Returns:
Returns a list of forges or an empty list if none are found with the specified forge group.

getForgeGroupNames

public java.util.List<java.lang.String> getForgeGroupNames()
Retrieves a list of all the forge groups with which the group's forges are associated..

Returns:
Returns a list of forge groups or an empty list, of graphs are not explicitly associated with forge groups (i.e. all graphs are in a single, unnamed forge group).

setForges

public void setForges(java.util.List<ForgeComponent> forges)

addForge

public void addForge(ForgeComponent forge)
Adds a forge to the group.

Parameters:
forge -

isGetDataInParallel

public boolean isGetDataInParallel()

setGetDataInParallel

public void setGetDataInParallel(boolean getDataInParallel)

setCachedAppDefinition

public void setCachedAppDefinition(com.endeca.eac.client.ApplicationType cachedAppDefinition)
Overrides:
setCachedAppDefinition in class com.endeca.soleng.eac.toolkit.base.Provisionable

EAC Components 3.2.2

Copyright © 2006, 2012, Oracle and/or its affiliates. All rights reserved.
@VERSION
PRODUCT: EAC Components (eacComponents)
VERSION: 3.2.2
BUILD:   NONEDEV
ARCH_OS: n/a
DATE:    2012-02-28T13:13:23-0500