EAC Components 3.2.2

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

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.AgraphCluster

public class AgraphCluster
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
AgraphCluster()
          Default constructor.
 
Method Summary
 void addAgraph(AgraphComponent agraph)
          Adds a agraph to the group.
 void addDgraph(DgraphComponent dgraph)
          Adds a dgraph to the group.
 void applyConfigUpdate()
          Updates the configuration of dgraphs in the group.
 void applyIndex()
          Cycles the dgraphs in the group.
 void applyPartialUpdates()
          Updates the dgraphs in the group.
 void cleanDirs()
           
 void cleanLocalDgraphConfigDirs()
           
 void cleanLocalIndexDirs()
           
 void copyCumulativePartialUpdatesToDgraphServers()
          Retrieves cumulative partials for each dgraph in the group.
 void copyDgraphConfigToDgraphServers()
          Retrieves dgraph config for each dgraph in the group.
 void copyIndexToAgraphServers()
          Retrieves a new index for each agraph in the group.
 void copyIndexToDgraphServers()
          Retrieves a new index for each dgraph in the group.
 void copyPartialUpdateToDgraphServers()
          Retrieves a partial update for each dgraph in the group.
 AgraphComponent getAgraphById(java.lang.String agraphId)
          Retrieves the Agraph with the specified ID from the group.
 java.util.Map<java.lang.String,java.util.List<AgraphComponent>> getAgraphRestartGroups()
          Retrieves a map, whose keys are the restart groups defined for the application, and whose values are lists of agraphs belonging to each restart group.
 java.util.List<AgraphComponent> getAgraphs()
           
 java.util.List<AgraphComponent> getAgraphsInRestartGroup(java.lang.String restartGroup)
          Retrieves a list of all agraphs belonging to the specified restart group.
 DgraphComponent getDgraphById(java.lang.String dgraphId)
          Retrieves the Dgraph with the specified ID from the group.
 java.util.Map<java.lang.String,java.util.List<DgraphComponent>> getDgraphRestartGroups()
          Retrieves a map, whose keys are the restart groups defined for the application, and whose values are lists of dgraphs belonging to each restart group.
 java.util.List<DgraphComponent> getDgraphs()
           
 java.util.List<DgraphComponent> getDgraphsInRestartGroup(java.lang.String restartGroup)
          Retrieves a list of all dgraphs belonging to the specified restart group.
 java.util.List<java.lang.String> getRestartGroups()
          Retrieves a list of all the restart groups with which the group's dgraphs are associated..
 boolean isDefined()
          Checks whether the member graphs in the group are defined.
 boolean isDefinitionChanged()
          Checks whether the member graphs in the group have changed.
 boolean isGetDataInParallel()
           
 void removeDefinition()
          Removes the definition of each defined graph in the group.
 void setAgraphs(java.util.List<AgraphComponent> agraphs)
           
 void setCachedAppDefinition(com.endeca.eac.client.ApplicationType cachedAppDefinition)
           
 void setDefinition()
          Sets the definition of each graph in the group that is not already defined.
 void setDgraphs(java.util.List<DgraphComponent> dgraphs)
           
 void setGetDataInParallel(boolean getDataInParallel)
           
 void start()
           
 void stop()
           
 void updateDefinition()
          Updates the definition of each graph 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

AgraphCluster

public AgraphCluster()
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

cleanLocalIndexDirs

public void cleanLocalIndexDirs()
                         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

cleanLocalDgraphConfigDirs

public void cleanLocalDgraphConfigDirs()
                                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

copyIndexToDgraphServers

public void copyIndexToDgraphServers()
                              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
Retrieves a new index for each dgraph in the group. This method will retrieve a single copy of the index to each uniquely identified local index directory on each unique host. That means if multiple dgraphs run on the same server and specify the same index directory, only a single copy will be performed to that directory.

Throws:
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
java.lang.InterruptedException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException

copyIndexToAgraphServers

public void copyIndexToAgraphServers()
                              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
Retrieves a new index for each agraph in the group. This method will retrieve a single copy of the index to each uniquely identified local index directory on each unique host. That means if multiple agraphs run on the same server and specify the same index directory, only a single copy will be performed to that directory.

Throws:
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
java.lang.InterruptedException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException

copyPartialUpdateToDgraphServers

public void copyPartialUpdateToDgraphServers()
                                      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
Retrieves a partial update for each dgraph in the group. This method will retrieve a single copy of the partial update to each uniquely identified local partials directory on each unique host. That means if multiple dgraphs run on the same server and specify the same partials directory, only a single copy will be performed to that directory.

Throws:
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
java.lang.InterruptedException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException

copyCumulativePartialUpdatesToDgraphServers

public void copyCumulativePartialUpdatesToDgraphServers()
                                                 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
Retrieves cumulative partials for each dgraph in the group. This method will retrieve a single copy of the complete cumulative partials directory to each uniquely identified local cumulative partials directory on each unique host. That means if multiple dgraphs run on the same server and specify the same cumulative partials directory, only a single copy will be performed to that directory.

Throws:
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
java.lang.InterruptedException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException

copyDgraphConfigToDgraphServers

public void copyDgraphConfigToDgraphServers()
                                     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
Retrieves dgraph config for each dgraph in the group. This method will retrieve a single copy of the dgraph config directory to each uniquely identified local dgraph config directory on each unique host. That means if multiple dgraphs run on the same server and specify the same dgraph config directory, only a single copy will be performed to that directory.

Throws:
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
java.lang.InterruptedException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException

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

applyIndex

public void applyIndex()
                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
Cycles the dgraphs in the group. If restart groups are defined, graphs belonging to the same restart group are cycled simultaneously. If no restart groups are defined, all dgraphs are automatically assigned to their own groups, effectively causing the cycle method to cycle each dgraph one at a time. If all dgraphs are explicitly assigned to a single restart group, all dgraphs are restarted simultaneously.

Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException - If a communication error occurs while cycling a component.
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException - If an error occurs while trying to cycle a component.
java.lang.InterruptedException - If the thread is interrupted while waiting for a component to finish.
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException - If a utility fails to initialize because of insufficient configuration information.

applyPartialUpdates

public void applyPartialUpdates()
                         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
Updates the dgraphs in the group. If restart groups are defined, graphs belonging to the same restart group are updated simultaneously. If no restart groups are defined, all dgraphs are automatically assigned to their own groups, effectively causing the update method to update each dgraph one at a time. If all dgraphs are explicitly assigned to a single restart group, all dgraphs are updated simultaneously.

Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException - If a communication error occurs while cycling a component.
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException - If an error occurs while trying to cycle a component.
java.lang.InterruptedException - If the thread is interrupted while waiting for a component to finish.
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException - If a utility fails to initialize because of insufficient configuration information.

applyConfigUpdate

public void applyConfigUpdate()
                       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
Updates the configuration of dgraphs in the group. If restart groups are defined, graphs belonging to the same restart group are updated simultaneously. If no restart groups are defined, all dgraphs are automatically assigned to their own groups, effectively causing the update method to update each dgraph one at a time. If all dgraphs are explicitly assigned to a single restart group, all dgraphs are updated simultaneously.

Throws:
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException - If a communication error occurs while updating a component.
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException - If an error occurs while trying to update a component.
java.lang.InterruptedException - If the thread is interrupted while waiting for a component to finish.
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException - If a utility fails to initialize because of insufficient configuration information.

isDefined

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

Specified by:
isDefined in class com.endeca.soleng.eac.toolkit.base.Provisionable
Returns:
Returns true if all graphs are defined. Returns false if any graph 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 graphs in the group have changed.

Specified by:
isDefinitionChanged in class com.endeca.soleng.eac.toolkit.base.Provisionable
Returns:
Returns false if none of the graphs have changed. Returns true if any of the member graphs 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 graph in the group. Any graph 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 graph 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 graph in the group. If a graph 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

getDgraphs

public java.util.List<DgraphComponent> getDgraphs()

getAgraphs

public java.util.List<AgraphComponent> getAgraphs()

getDgraphById

public DgraphComponent getDgraphById(java.lang.String dgraphId)
Retrieves the Dgraph with the specified ID from the group.

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

getAgraphById

public AgraphComponent getAgraphById(java.lang.String agraphId)
Retrieves the Agraph with the specified ID from the group.

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

getDgraphRestartGroups

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

Returns:
Returns a map of restart groups and a list of dgraphs assigned to each group.

getAgraphRestartGroups

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

Returns:
Returns a map of restart groups and a list of agraphs assigned to each group.

getDgraphsInRestartGroup

public java.util.List<DgraphComponent> getDgraphsInRestartGroup(java.lang.String restartGroup)
Retrieves a list of all dgraphs belonging to the specified restart group.

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

getAgraphsInRestartGroup

public java.util.List<AgraphComponent> getAgraphsInRestartGroup(java.lang.String restartGroup)
Retrieves a list of all agraphs belonging to the specified restart group.

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

getRestartGroups

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

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

setDgraphs

public void setDgraphs(java.util.List<DgraphComponent> dgraphs)

setAgraphs

public void setAgraphs(java.util.List<AgraphComponent> agraphs)

addDgraph

public void addDgraph(DgraphComponent dgraph)
Adds a dgraph to the group.

Parameters:
dgraph -

addAgraph

public void addAgraph(AgraphComponent agraph)
Adds a agraph to the group.

Parameters:
agraph -

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