Skip to content

Commit

Permalink
REFACTOR: Remove deprecated repl setter.
Browse files Browse the repository at this point in the history
  • Loading branch information
brido4125 authored and jhpark816 committed Sep 25, 2024
1 parent 033e5ab commit f000fd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/spy/memcached/CacheManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,14 @@ private void initZooKeeperClient() {
/* ENABLE_REPLICATION if */
if (zk.exists(ARCUS_REPL_CACHE_LIST_ZPATH + serviceCode, false) != null) {
arcusReplEnabled = true;
cfb.internalArcusReplEnabled(true);
cfb.setArcusReplEnabled(true);
getLogger().info("Connected to Arcus repl cluster (serviceCode=%s)", serviceCode);
} else {
/* ENABLE_REPLICATION end */
if (zk.exists(ARCUS_BASE_CACHE_LIST_ZPATH + serviceCode, false) != null) {
/* ENABLE_REPLICATION if */
arcusReplEnabled = false;
cfb.internalArcusReplEnabled(false);
cfb.setArcusReplEnabled(false);
/* ENABLE_REPLICATION end */
getLogger().info("Connected to Arcus cluster (seriveCode=%s)", serviceCode);
} else {
Expand Down
22 changes: 1 addition & 21 deletions src/main/java/net/spy/memcached/ConnectionFactoryBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,29 +113,9 @@ public boolean getArcusMigrationCheck() {

/* ENABLE_REPLICATION if */
/* Called by cache manager after checking ZK nodes */
public void internalArcusReplEnabled(boolean b) {
void setArcusReplEnabled(boolean b) {
arcusReplEnabled = b;
}

/* @deprecated This method is no longer needed by applications.
* The replication cluster is internally determined by checking
* ZK directories for the given service code. The service code
* must be unique in each ZK ensemble.
*/
@Deprecated
public ConnectionFactoryBuilder setArcusReplEnabled(boolean enable) {
return this;
}

/* @deprecated This method is no longer needed by applications.
* The replication cluster is internally determined by checking
* ZK directories for the given service code. The service code
* must be unique in each ZK ensemble.
*/
@Deprecated
public boolean getArcusReplEnabled() {
return arcusReplEnabled;
}
/* ENABLE_REPLICATION end */

public FailureMode getFailureMode() {
Expand Down

0 comments on commit f000fd3

Please sign in to comment.