From dad544aa35d872780f09e400ec57beb1e71d110e Mon Sep 17 00:00:00 2001 From: cheesecrust Date: Mon, 30 Sep 2024 12:11:20 +0900 Subject: [PATCH] INTERNAL: Make final class which is not inherit --- src/main/java/net/spy/memcached/ArcusReplNodeAddress.java | 2 +- src/main/java/net/spy/memcached/CacheManager.java | 2 +- src/main/java/net/spy/memcached/CacheMonitor.java | 2 +- src/main/java/net/spy/memcached/MemcachedNodeROImpl.java | 2 +- src/main/java/net/spy/memcached/MemcachedReplicaGroupImpl.java | 2 +- .../java/net/spy/memcached/MemcachedReplicaGroupROImpl.java | 2 +- src/main/java/net/spy/memcached/MigrationMonitor.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/spy/memcached/ArcusReplNodeAddress.java b/src/main/java/net/spy/memcached/ArcusReplNodeAddress.java index fdbb88686..d3f066583 100644 --- a/src/main/java/net/spy/memcached/ArcusReplNodeAddress.java +++ b/src/main/java/net/spy/memcached/ArcusReplNodeAddress.java @@ -29,7 +29,7 @@ import net.spy.memcached.compat.log.Logger; import net.spy.memcached.compat.log.LoggerFactory; -public class ArcusReplNodeAddress extends InetSocketAddress { +public final class ArcusReplNodeAddress extends InetSocketAddress { private static final long serialVersionUID = -1555690881482453720L; private static final Logger arcusLogger = LoggerFactory.getLogger(ArcusReplNodeAddress.class); diff --git a/src/main/java/net/spy/memcached/CacheManager.java b/src/main/java/net/spy/memcached/CacheManager.java index 752ccd307..36756b26d 100644 --- a/src/main/java/net/spy/memcached/CacheManager.java +++ b/src/main/java/net/spy/memcached/CacheManager.java @@ -47,7 +47,7 @@ * memcached server in the remote machine. It also changes the * previous ketama node */ -public class CacheManager extends SpyThread implements Watcher, +public final class CacheManager extends SpyThread implements Watcher, CacheMonitor.CacheMonitorListener, MigrationMonitor.MigrationMonitorListener { private static final String ARCUS_BASE_CACHE_LIST_ZPATH = "/arcus/cache_list/"; diff --git a/src/main/java/net/spy/memcached/CacheMonitor.java b/src/main/java/net/spy/memcached/CacheMonitor.java index 7d59ccf65..42280e31f 100644 --- a/src/main/java/net/spy/memcached/CacheMonitor.java +++ b/src/main/java/net/spy/memcached/CacheMonitor.java @@ -31,7 +31,7 @@ * CacheMonitor monitors the changes of the cache server list * in the ZooKeeper node{@code (/arcus/cache_list/)}. */ -public class CacheMonitor extends SpyObject implements Watcher, +public final class CacheMonitor extends SpyObject implements Watcher, ChildrenCallback { private final ZooKeeper zk; diff --git a/src/main/java/net/spy/memcached/MemcachedNodeROImpl.java b/src/main/java/net/spy/memcached/MemcachedNodeROImpl.java index 6dcbca7b8..b162bd951 100644 --- a/src/main/java/net/spy/memcached/MemcachedNodeROImpl.java +++ b/src/main/java/net/spy/memcached/MemcachedNodeROImpl.java @@ -26,7 +26,7 @@ import net.spy.memcached.ops.Operation; -public class MemcachedNodeROImpl implements MemcachedNode { +public final class MemcachedNodeROImpl implements MemcachedNode { private final MemcachedNode root; diff --git a/src/main/java/net/spy/memcached/MemcachedReplicaGroupImpl.java b/src/main/java/net/spy/memcached/MemcachedReplicaGroupImpl.java index a7c0acd56..590fb2cbd 100644 --- a/src/main/java/net/spy/memcached/MemcachedReplicaGroupImpl.java +++ b/src/main/java/net/spy/memcached/MemcachedReplicaGroupImpl.java @@ -18,7 +18,7 @@ /* ENABLE_REPLICATION if */ package net.spy.memcached; -public class MemcachedReplicaGroupImpl extends MemcachedReplicaGroup { +public final class MemcachedReplicaGroupImpl extends MemcachedReplicaGroup { public MemcachedReplicaGroupImpl(final MemcachedNode node) { super(getGroupNameFromNode(node)); diff --git a/src/main/java/net/spy/memcached/MemcachedReplicaGroupROImpl.java b/src/main/java/net/spy/memcached/MemcachedReplicaGroupROImpl.java index 93c76e017..ba9c12c81 100644 --- a/src/main/java/net/spy/memcached/MemcachedReplicaGroupROImpl.java +++ b/src/main/java/net/spy/memcached/MemcachedReplicaGroupROImpl.java @@ -17,7 +17,7 @@ /* ENABLE_REPLICATION if */ package net.spy.memcached; -public class MemcachedReplicaGroupROImpl extends MemcachedReplicaGroup { +public final class MemcachedReplicaGroupROImpl extends MemcachedReplicaGroup { public MemcachedReplicaGroupROImpl(final MemcachedReplicaGroup group) { super(group.getGroupName()); this.masterNode = new MemcachedNodeROImpl(group.getMasterNode()); diff --git a/src/main/java/net/spy/memcached/MigrationMonitor.java b/src/main/java/net/spy/memcached/MigrationMonitor.java index 295cc7e84..853d47347 100644 --- a/src/main/java/net/spy/memcached/MigrationMonitor.java +++ b/src/main/java/net/spy/memcached/MigrationMonitor.java @@ -32,7 +32,7 @@ * MigrationMonitor monitors the changes of the cloud_stat * in the ZooKeeper node{@code (/arcus/cloud_stat/)}. */ -public class MigrationMonitor extends SpyObject implements Watcher { +public final class MigrationMonitor extends SpyObject implements Watcher { private final ZooKeeper zk;