From 86f55679776abf50897ce5bf3ac5f8d90b370a74 Mon Sep 17 00:00:00 2001 From: Shashi Madappa Date: Tue, 14 Jul 2020 13:23:22 -0700 Subject: [PATCH] Added a helper method to return the EVCacheClient --- .../src/main/java/net/spy/memcached/EVCacheNode.java | 3 +++ .../spy/memcached/protocol/ascii/EVCacheAsciiNodeImpl.java | 4 ++++ .../net/spy/memcached/protocol/binary/EVCacheNodeImpl.java | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/evcache-core/src/main/java/net/spy/memcached/EVCacheNode.java b/evcache-core/src/main/java/net/spy/memcached/EVCacheNode.java index 6b82a277..840e7060 100644 --- a/evcache-core/src/main/java/net/spy/memcached/EVCacheNode.java +++ b/evcache-core/src/main/java/net/spy/memcached/EVCacheNode.java @@ -3,6 +3,7 @@ import java.util.List; import com.netflix.evcache.EVCache; +import com.netflix.evcache.pool.EVCacheClient; import com.netflix.evcache.pool.ServerGroup; import com.netflix.spectator.api.Tag; @@ -58,5 +59,7 @@ public interface EVCacheNode extends MemcachedNode { int getReconnectCount(); boolean isActive(); + + EVCacheClient getEVCacheClient(); } \ No newline at end of file diff --git a/evcache-core/src/main/java/net/spy/memcached/protocol/ascii/EVCacheAsciiNodeImpl.java b/evcache-core/src/main/java/net/spy/memcached/protocol/ascii/EVCacheAsciiNodeImpl.java index 5d0c579a..ce6c02e9 100644 --- a/evcache-core/src/main/java/net/spy/memcached/protocol/ascii/EVCacheAsciiNodeImpl.java +++ b/evcache-core/src/main/java/net/spy/memcached/protocol/ascii/EVCacheAsciiNodeImpl.java @@ -230,4 +230,8 @@ public String getConnectTime() { } + @Override + public EVCacheClient getEVCacheClient() { + return client; + } } diff --git a/evcache-core/src/main/java/net/spy/memcached/protocol/binary/EVCacheNodeImpl.java b/evcache-core/src/main/java/net/spy/memcached/protocol/binary/EVCacheNodeImpl.java index 053edeb2..b1593111 100644 --- a/evcache-core/src/main/java/net/spy/memcached/protocol/binary/EVCacheNodeImpl.java +++ b/evcache-core/src/main/java/net/spy/memcached/protocol/binary/EVCacheNodeImpl.java @@ -325,4 +325,9 @@ public String getSocketChannelRemoteAddress() { public String getConnectTime() { return ISODateTimeFormat.dateTime().print(stTime); } + + @Override + public EVCacheClient getEVCacheClient() { + return client; + } }