public class S3_PING extends FILE_PING
FILE_PING.InfoWriter
Discovery.DiscoveryCacheDisseminationTask
Modifier and Type | Field and Description |
---|---|
protected String |
access_key |
protected org.jgroups.protocols.S3_PING.AWSAuthConnection |
conn |
protected String |
host |
protected int |
port |
protected String |
pre_signed_delete_url |
protected String |
pre_signed_put_url |
protected String |
prefix |
protected String |
secret_access_key |
protected boolean |
skip_bucket_existence_check |
protected boolean |
use_ssl |
filter, info_writer, info_writer_max_writes_after_view, info_writer_sleep_time, interval, location, reads, regexp, remove_all_files_on_view_change, remove_old_coords_on_view_change, root_dir, SUFFIX, writes
always_send_physical_addr_with_discovery_request, async_discovery, async_discovery_use_separate_thread_per_request, break_on_coord_rsp, cluster_name, current_coord, discovery_rsp_expiry_time, force_sending_discovery_rsps, is_coord, is_leaving, is_server, local_addr, max_members_in_discovery_request, members, num_discovery_requests, num_initial_members, num_initial_srv_members, ping_responses, return_entire_cache, send_cache_on_join, stagger_timeout, timeout, timer, transport_supports_multicasting, use_disk_cache, view, WHITESPACE
after_creation_hook, down_prot, ergonomics, id, log, name, stack, stats, up_prot
Constructor and Description |
---|
S3_PING() |
Modifier and Type | Method and Description |
---|---|
protected org.jgroups.protocols.S3_PING.AWSAuthConnection |
createConnection() |
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 void |
readAll(List<Address> members,
String clustername,
Responses responses) |
protected void |
readResponse(org.jgroups.protocols.S3_PING.GetResponse rsp,
List<Address> mbrs,
Responses responses) |
protected void |
remove(String clustername,
Address addr) |
protected void |
removeAll(String clustername)
Removes all files for the given cluster name
|
protected static String |
sanitize(String name)
Sanitizes bucket and folder names according to AWS guidelines
|
protected boolean |
usingPreSignedUrls() |
protected void |
validateProperties() |
protected void |
write(List<PingData> list,
String clustername) |
addDiscoveryResponseToCaches, addressToFilename, deleteFile, down, findMembers, handleView, isDynamic, isInfoWriterRunning, read, read, resetStats, startInfoWriter, stopInfoWriter, write, writeAll, writeInfo
addResponse, addressAsString, addToCache, breakOnCoordResponse, breakOnCoordResponse, deserialize, discoveryRequestReceived, discoveryRspExpiryTime, disseminateDiscoveryInformation, dumpCache, findInitialMembersAsString, findMembers, forceDiscoveryResponses, forceDiscoveryResponses, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getTimeout, getView, getViewId, handleConnect, handleDisconnect, handleDiscoveryResponse, isCoord, isMergeRunning, marshal, numInitialMembers, numInitialMembers, providedUpServices, readPingData, returnEntireCache, returnEntireCache, sendCacheInformation, sendDiscoveryResponse, serializeWithoutView, setForceSendingDiscoveryRsps, setNumInitialMembers, setTimeout, staggerTimeout, staggerTimeout, start, startCacheDissemination, stop, timeout, timeout, up, useDiskCache, useDiskCache, weedOutCompletedDiscoveryResponses
accept, afterCreationHook, destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, printStats, providedDownServices, requiredDownServices, requiredUpServices, resetStatistics, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabled, up
protected String host
protected int port
protected boolean use_ssl
protected String access_key
protected String secret_access_key
protected String prefix
protected String pre_signed_put_url
protected String pre_signed_delete_url
protected boolean skip_bucket_existence_check
protected org.jgroups.protocols.S3_PING.AWSAuthConnection conn
public void init() throws Exception
Protocol
protected org.jgroups.protocols.S3_PING.AWSAuthConnection createConnection()
protected void createRootDir()
createRootDir
in class FILE_PING
protected void readResponse(org.jgroups.protocols.S3_PING.GetResponse rsp, List<Address> mbrs, Responses responses)
protected void removeAll(String clustername)
FILE_PING
protected 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 © 2017 JBoss, a division of Red Hat. All rights reserved.