Skip to content

Commit

Permalink
dcache-core: Move LeadershipListenerGroup for reusability
Browse files Browse the repository at this point in the history
Motivation:

The LeadershipListenerGroup is used to notify several components of leadership changes via the HAServiceLeadershipManager for the HA Cleaner service. In order to reuse it for other services, it is useful for the class to be located in a central place.

Modification:

Moved the LeadershipListenerGroup class to dcache-core, where the HAServiceLeadershipManager and CuratorFrameworkAware interface resides.

Result:

Reusing the LeadershipListenerGroup for other services is possible. High availability as implemented for the Cleaner service can be transferred to other services.
Addition to patch #12441.

Target: master
Requires-notes: no
Requires-book: no
Patch: https://rb.dcache.org/r/12443/
Acked-by: Albert Rossi
  • Loading branch information
lemora committed Jul 1, 2020
1 parent 86ce323 commit 87a6fbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -118,7 +118,7 @@
</property>
</bean>

<bean id="baseleaderlistener-group" abstract="true" class="org.dcache.chimera.namespace.LeadershipListenerGroup">
<bean id="baseleaderlistener-group" abstract="true" class="org.dcache.cells.LeadershipListenerGroup">
<description>Propagates leadership change notifications to managed listeners</description>
<property name="leaderElectionAwareComponents">
<set>
Expand Down
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.dcache.chimera.namespace;
package org.dcache.cells;

import org.apache.curator.framework.recipes.leader.LeaderLatchListener;
import org.slf4j.Logger;
Expand Down

0 comments on commit 87a6fbe

Please sign in to comment.