public class DYNAMODB_PING extends org.jgroups.protocols.FILE_PING
JGroups discovery protocol using a shared Amazon Web Services (JWS) DynamoDB table.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
check_if_table_exists |
protected String |
cluster_name_prefix |
protected String |
endpoint |
protected static short |
JGROUPS_PROTOCOL_MAGIC_NUMBER
The DYNAMODB_PING magic number.
|
protected String |
region_name |
protected boolean |
store_debug_info |
protected com.amazonaws.services.dynamodbv2.document.Table |
table
The DynamoDB ping table.
|
protected String |
table_name |
filter, info_writer, info_writer_max_writes_after_view, info_writer_sleep_time, location, reads, regexp, register_shutdown_hook, remove_all_data_on_view_change, remove_old_coords_on_view_change, root_dir, SUFFIX, update_store_on_view_change, write_data_on_find, writesasync_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, local_addr, 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, use_ip_addrs, view, WHITESPACE| Constructor and Description |
|---|
DYNAMODB_PING() |
| Modifier and Type | Method and Description |
|---|---|
protected com.amazonaws.services.dynamodbv2.model.CreateTableRequest |
composeCreateTableRequest()
Composes a create table request for the DynamoDB ping table.
|
protected com.amazonaws.services.dynamodbv2.document.PrimaryKey |
composePrimaryKey(String ownAddress,
String clusterName)
Composes the DynamoDB primary key for the specified JGroups address
an cluster name.
|
protected com.amazonaws.services.dynamodbv2.document.spec.ScanSpec |
composeScanSpec(String clusterName)
Composes the DynamoDB scan spec for the specified cluster name.
|
protected String |
composeStoredClusterName(String clusterName)
Composes the final stored cluster name.
|
protected void |
createRootDir() |
protected void |
createTableIfMissing(com.amazonaws.services.dynamodbv2.AmazonDynamoDB client)
Creates a new DynamoDB ping table if missing.
|
void |
init() |
protected void |
putIntoTable(org.jgroups.protocols.PingData data,
String clusterName)
Puts the specified ping data into the DynamoDB table.
|
protected void |
readAll(List<org.jgroups.Address> members,
String clusterName,
org.jgroups.util.Responses responses) |
protected void |
remove(String clusterName,
org.jgroups.Address address) |
protected void |
removeAll(String clusterName) |
void |
stop() |
protected com.amazonaws.services.dynamodbv2.document.Item |
toItem(org.jgroups.protocols.PingData data,
String clusterName)
Converts the specified ping data to a DynamoDB item.
|
protected org.jgroups.protocols.PingData |
toPingData(com.amazonaws.services.dynamodbv2.document.Item item)
Converts the specified DynamoDB item to ping data.
|
protected void |
write(List<org.jgroups.protocols.PingData> list,
String clusterName) |
addressToFilename, deleteFile, down, findMembers, getLocation, getRemoveAllDataOnViewChange, handleView, isDynamic, isInfoWriterRunning, read, read, resetStats, setLocation, setRemoveAllDataOnViewChange, startInfoWriter, stopInfoWriter, write, writeAll, writeAll, writeInfoaddDiscoveryResponseToCaches, addResponse, addResponse, addressAsString, addToCache, breakOnCoordResponse, breakOnCoordResponse, clearRequestFutures, deserialize, discoveryRequestReceived, discoveryRspExpiryTime, disseminateDiscoveryInformation, dumpCache, findInitialMembersAsString, findMembers, getClusterName, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getView, getViewId, handleConnect, handleDisconnect, handleDiscoveryResponse, invokeFindMembers, isCoord, isMergeRunning, marshal, providedUpServices, readPingData, returnEntireCache, returnEntireCache, sendCacheInformation, sendDiscoveryResponse, serializeWithoutView, setClusterName, staggerTimeout, staggerTimeout, start, startCacheDissemination, up, up, useDiskCache, useDiskCache, weedOutCompletedDiscoveryResponsesaccept, afterCreationHook, destroy, down, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, providedDownServices, requiredDownServices, requiredUpServices, resetStatistics, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, statsEnabled, upprotected static final short JGROUPS_PROTOCOL_MAGIC_NUMBER
protected String region_name
protected String table_name
protected boolean check_if_table_exists
protected String cluster_name_prefix
protected boolean store_debug_info
protected com.amazonaws.services.dynamodbv2.document.Table table
public DYNAMODB_PING()
public void init() throws Exception
init in class org.jgroups.protocols.FILE_PINGExceptionprotected void createTableIfMissing(com.amazonaws.services.dynamodbv2.AmazonDynamoDB client)
client - The DynamoDB client.protected com.amazonaws.services.dynamodbv2.model.CreateTableRequest composeCreateTableRequest()
public void stop()
stop in class org.jgroups.protocols.FILE_PINGprotected void createRootDir()
createRootDir in class org.jgroups.protocols.FILE_PINGprotected void readAll(List<org.jgroups.Address> members, String clusterName, org.jgroups.util.Responses responses)
readAll in class org.jgroups.protocols.FILE_PINGprotected String composeStoredClusterName(String clusterName)
protected com.amazonaws.services.dynamodbv2.document.PrimaryKey composePrimaryKey(String ownAddress, String clusterName)
ownAddress - The own address.clusterName - The cluster name.protected com.amazonaws.services.dynamodbv2.document.spec.ScanSpec composeScanSpec(String clusterName)
clusterName - The cluster name.protected com.amazonaws.services.dynamodbv2.document.Item toItem(org.jgroups.protocols.PingData data, String clusterName)
data - The ping data.clusterName - The cluster mame.protected org.jgroups.protocols.PingData toPingData(com.amazonaws.services.dynamodbv2.document.Item item) throws Exception
item - The DynamoDB item.Exception - If conversion failed.protected void write(List<org.jgroups.protocols.PingData> list, String clusterName)
write in class org.jgroups.protocols.FILE_PINGprotected void putIntoTable(org.jgroups.protocols.PingData data, String clusterName)
data - The ping data.clusterName - The cluster name.protected void remove(String clusterName, org.jgroups.Address address)
remove in class org.jgroups.protocols.FILE_PINGCopyright © 2019 Connect2id Ltd.. All rights reserved.