Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* dCache - http://www.dcache.org/
*
* Copyright (C) 2016 - 2024 Deutsches Elektronen-Synchrotron
* Copyright (C) 2016 - 2026 Deutsches Elektronen-Synchrotron
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -394,6 +394,11 @@ public SchemaSet getSchemaSet() {
return inner.getSchemaSet();
}

@Override
public boolean compressionEnabled() {
return inner.compressionEnabled();
}

@Override
public CompletableFuture<Void> postSafeNotify(Object monitorHolder) {
return inner.postSafeNotify(monitorHolder);
Expand Down Expand Up @@ -550,6 +555,11 @@ public CreateBackgroundModeStatACLable compressed() {
return new CreateBackgroundModeStatACLableDecorator(inner.compressed());
}

@Override
public CreateBackgroundModeStatACLable uncompressed() {
return new CreateBackgroundModeStatACLableDecorator(inner.uncompressed());
}

@Override
public CreateBuilder2 idempotent() {
return inner.idempotent();
Expand Down Expand Up @@ -766,6 +776,11 @@ public GetDataWatchBackgroundStatable decompressed() {
return new GetDataWatchBackgroundStatableDecorator(inner.decompressed());
}

@Override
public GetDataWatchBackgroundStatable undecompressed() {
return new GetDataWatchBackgroundStatableDecorator(inner.undecompressed());
}

@Override
public byte[] forPath(String path) throws Exception {
return inner.forPath(path);
Expand Down Expand Up @@ -842,6 +857,11 @@ public SetDataBackgroundVersionable compressed() {
return new SetDataBackgroundVersionableDecorator(inner.compressed());
}

@Override
public SetDataBackgroundVersionable uncompressed() {
return new SetDataBackgroundVersionableDecorator(inner.uncompressed());
}

@Override
public Stat forPath(String path, byte[] data) throws Exception {
return inner.forPath(path, data);
Expand Down Expand Up @@ -1058,6 +1078,11 @@ public ACLCreateModePathAndBytesable<CuratorTransactionBridge> compressed() {
return new ACLCreateModePathAndBytesableDecorator<>(inner.compressed());
}

@Override
public ACLCreateModePathAndBytesable<CuratorTransactionBridge> uncompressed() {
return new ACLCreateModePathAndBytesableDecorator<>(inner.uncompressed());
}

@Override
public ACLPathAndBytesable<CuratorTransactionBridge> withMode(CreateMode mode) {
return new ACLPathAndBytesableDecorator<>(inner.withMode(mode));
Expand Down Expand Up @@ -1118,6 +1143,11 @@ public VersionPathAndBytesable<CuratorTransactionBridge> compressed() {
return new VersionPathAndBytesableCuratorTransactionBridgeDecorator(inner.compressed());
}

@Override
public VersionPathAndBytesable<CuratorTransactionBridge> uncompressed() {
return new VersionPathAndBytesableCuratorTransactionBridgeDecorator(inner.uncompressed());
}

@Override
public CuratorTransactionBridge forPath(String path, byte[] data) throws Exception {
return new CuratorTransactionBridgeDecorator(inner.forPath(path, data));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* dCache - http://www.dcache.org/
*
* Copyright (C) 2020 - 2024 Deutsches Elektronen-Synchrotron
* Copyright (C) 2020 - 2026 Deutsches Elektronen-Synchrotron
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -35,6 +35,7 @@
import java.util.concurrent.Callable;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.recipes.leader.LeaderLatch;
import org.apache.curator.framework.recipes.leader.LeaderLatch.CloseMode;
import org.apache.curator.framework.recipes.leader.LeaderLatchListener;
import org.apache.curator.framework.recipes.leader.Participant;
import org.apache.curator.utils.CloseableUtils;
Expand Down Expand Up @@ -102,7 +103,7 @@ private void createZkLeadershipPath(String serviceName) {
* Creates a ZooKeeper leader latch, attaches and starts a listener.
*/
private void initZkLeaderListener() {
zkLeaderLatch = new LeaderLatch(zkClient, zkLeaderPath, cellAddress.toString());
zkLeaderLatch = new LeaderLatch(zkClient, zkLeaderPath, cellAddress.toString(), CloseMode.NOTIFY_LEADER);
zkLeaderLatch.addListener(new CDCLeaderLatchListener(leadershipListener));
try {
zkLeaderLatch.start();
Expand All @@ -118,7 +119,7 @@ public boolean hasLeadership() {

private synchronized void releaseLeadership() {
try {
zkLeaderLatch.close(LeaderLatch.CloseMode.NOTIFY_LEADER);
zkLeaderLatch.close();
} catch (Exception e) {
Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>5.7.0</version>
<version>5.9.0</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand Down
Loading