Package org.jgroups.protocols.kubernetes
Class KUBE_PING
java.lang.Object
org.jgroups.stack.Protocol
org.jgroups.protocols.Discovery
org.jgroups.protocols.kubernetes.KUBE_PING
- All Implemented Interfaces:
org.jgroups.Lifecycle
public class KUBE_PING
extends org.jgroups.protocols.Discovery
Kubernetes based discovery protocol. Uses the Kubernetes master to fetch the IP addresses of all pods that have
been created, then pings each pods separately. The ports are defined by bind_port in TP plus port_range.
- Author:
- Ales Justin, Sebastian Łaskawiec, Bela Ban, Radoslav Husar
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jgroups.protocols.Discovery
org.jgroups.protocols.Discovery.DiscoveryCacheDisseminationTask -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Clientprotected Stringprotected Stringprotected Stringprotected Stringprotected intprotected booleanprotected static final shortprotected Stringprotected Stringprotected intprotected Stringprotected Stringprotected intprotected longprotected intprotected intprotected Stringprotected booleanprotected intprotected booleanFields inherited from class org.jgroups.protocols.Discovery
async_discovery, async_discovery_use_separate_thread_per_request, break_on_coord_rsp, cluster_name, current_coord, discovery_req_futures, discovery_rsp_callback, discovery_rsp_expiry_time, is_coord, is_leaving, is_server, max_members_in_discovery_request, max_rank_to_reply, num_discovery_requests, num_discovery_runs, ping_responses, return_entire_cache, send_cache_on_join, sends_can_block, stagger_timeout, timer, transport, transport_supports_multicasting, use_disk_cache, view, WHITESPACEFields inherited from class org.jgroups.stack.Protocol
after_creation_hook, down_prot, ergonomics, id, local_addr, log, policies, preview_warning, stack, stats, up_prot -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfindMembers(List<org.jgroups.Address> members, boolean initial_discovery, org.jgroups.util.Responses responses) voidinit()protected booleanbooleanreadAll()protected voidsendDiscoveryRequest(org.jgroups.Message req) voidsetMasterHost(String masterMost) voidsetMasterPort(int masterPort) voidsetNamespace(String namespace) toString()Methods inherited from class org.jgroups.protocols.Discovery
addDiscoveryResponseToCaches, addResponse, addResponse, addressAsString, addToCache, asyncDiscovery, asyncDiscovery, asyncDiscoveryUseSeparateThread, asyncDiscoveryUseSeparateThread, breakOnCoordResponse, breakOnCoordResponse, callFindMembersInAllDiscoveryProtocols, clearRequestFutures, deserialize, discoveryRequestReceived, discoveryRspExpiryTime, discoveryRspExpiryTime, disseminateDiscoveryInformation, down, dumpCache, findInitialMembersAsString, findMembers, findTopmostDiscoveryProtocol, getClusterName, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getView, getViewId, handle, handleConnect, handleDisconnect, handleDiscoveryResponse, handleDiscoveryResponse, isCoord, isMergeRunning, marshal, marshal, marshal, maxRankToReply, maxRankToReply, numDiscoveryRuns, numDiscoveryRuns, print, providedUpServices, read, readPingData, resetStats, returnEntireCache, returnEntireCache, sendCacheInformation, sendCacheOnJoin, sendCacheOnJoin, sendDiscoveryResponse, sendDiscoveryResponse, serializeWithoutView, setClusterName, staggerTimeout, staggerTimeout, start, startCacheDissemination, stop, transportSupportsMulticasting, up, up, up, useDiskCache, useDiskCache, weedOutCompletedDiscoveryResponses, writeMethods inherited from class org.jgroups.stack.Protocol
accept, addPolicy, addr, addr, afterCreationHook, destroy, down, down, enableStats, getAddress, getComponents, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getPolicies, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, policies, previewWarning, previewWarning, providedDownServices, removePolicy, requiredDownServices, requiredUpServices, resetStatistics, setAddress, setDownProtocol, setErgonomics, setId, setLevel, setPolicies, setProtocolStack, setSocketFactory, setUpProtocol, setValue, statsEnabled
-
Field Details
-
KUBERNETES_PING_ID
protected static final short KUBERNETES_PING_ID- See Also:
-
port_range
protected int port_range -
connectTimeout
protected int connectTimeout -
readTimeout
protected int readTimeout -
operationAttempts
protected int operationAttempts -
operationSleep
protected long operationSleep -
masterProtocol
-
masterHost
-
masterPort
protected int masterPort -
apiVersion
-
namespace
-
labels
-
clientCertFile
-
clientKeyFile
-
clientKeyPassword
-
clientKeyAlgo
-
caCertFile
-
saTokenFile
-
split_clusters_during_rolling_update
protected boolean split_clusters_during_rolling_update -
useNotReadyAddresses
protected boolean useNotReadyAddresses -
dump_requests
protected boolean dump_requests -
client
-
tp_bind_port
protected int tp_bind_port
-
-
Constructor Details
-
KUBE_PING
public KUBE_PING()
-
-
Method Details
-
isDynamic
public boolean isDynamic()- Specified by:
isDynamicin classorg.jgroups.protocols.Discovery
-
setMasterHost
-
setMasterPort
public void setMasterPort(int masterPort) -
setNamespace
-
isClusteringEnabled
protected boolean isClusteringEnabled() -
init
- Specified by:
initin interfaceorg.jgroups.Lifecycle- Overrides:
initin classorg.jgroups.protocols.Discovery- Throws:
Exception
-
findMembers
public void findMembers(List<org.jgroups.Address> members, boolean initial_discovery, org.jgroups.util.Responses responses) - Specified by:
findMembersin classorg.jgroups.protocols.Discovery
-
fetchFromKube
-
readAll
-
sendDiscoveryRequest
protected void sendDiscoveryRequest(org.jgroups.Message req) -
toString
- Overrides:
toStringin classorg.jgroups.stack.Protocol
-