public class S3_PING extends FILE_PING
FILE_PING.WriterTaskDiscovery.PingSenderTask, Discovery.Responses| Modifier and Type | Field and Description |
|---|---|
protected String |
access_key |
protected org.jgroups.protocols.S3_PING.AWSAuthConnection |
conn |
protected String |
pre_signed_delete_url |
protected String |
pre_signed_put_url |
protected String |
prefix |
protected String |
secret_access_key |
filter, interval, location, root_dir, SUFFIXbreak_on_coord_rsp, group_addr, is_server, local_addr, max_found_members, max_rank, members, num_discovery_requests, num_initial_members, num_initial_srv_members, num_ping_requests, ping_responses, rank, return_entire_cache, sender, stagger_timeout, timeout, timer, view| Constructor and Description |
|---|
S3_PING() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createRootDir() |
static String |
generatePreSignedUrl(String awsAccessKey,
String awsSecretAccessKey,
String method,
String bucket,
String key,
long expirationDate)
Use this helper method to generate pre-signed S3 urls for use with S3_PING.
|
void |
init()
Called after instance has been created (null constructor) and before protocol is started.
|
protected List<PingData> |
readAll(String clustername)
Reads all information from the given directory under clustername
|
protected void |
remove(String clustername,
Address addr) |
protected static String |
sanitize(String name)
Sanitizes bucket and folder names according to AWS guidelines
|
protected boolean |
usingPreSignedUrls() |
protected void |
validateProperties() |
protected void |
writeToFile(PingData data,
String clustername) |
addressAsString, down, handleView, isDynamic, readFile, sendGetMembersRequest, start, stopdeserialize, discoveryRequestReceived, findAllViews, findAllViewsAsString, findInitialMembers, findInitialMembersAsString, findMembers, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getNumPingRequests, getTimeout, getView, getViewId, handleConnect, handleDisconnect, makeView, providedUpServices, resetStats, sendDiscoveryResponse, serializeWithoutView, setNumInitialMembers, setNumPingRequests, setTimeout, updestroy, downThreadEnabled, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getId, getLevel, getName, getProperties, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getValue, isErgonomics, printStats, providedDownServices, requiredDownServices, requiredUpServices, setDownProtocol, setErgonomics, setId, setLevel, setProperties, setPropertiesInternal, setProperty, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabled, upThreadEnabledprotected String access_key
protected String secret_access_key
protected String prefix
protected String pre_signed_put_url
protected String pre_signed_delete_url
protected org.jgroups.protocols.S3_PING.AWSAuthConnection conn
public void init()
throws Exception
Protocolprotected void createRootDir()
createRootDir in class FILE_PINGprotected List<PingData> readAll(String clustername)
FILE_PINGprotected void writeToFile(PingData data, String clustername)
writeToFile in class FILE_PINGprotected void validateProperties()
protected boolean usingPreSignedUrls()
protected static String sanitize(String name)
public static String generatePreSignedUrl(String awsAccessKey, String awsSecretAccessKey, String method, String bucket, String key, long expirationDate)
awsAccessKey - Your AWS Access KeyawsSecretAccessKey - Your AWS Secret Access Keymethod - The HTTP method - use "put" or "delete" for use with S3_PINGbucket - The S3 bucket you want to write tokey - The key within the bucket to write toexpirationDate - The date this pre-signed url should expire, in seconds since epochCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.