public class S3_PING extends FILE_PING
FILE_PING.InfoWriter
Discovery.DiscoveryCacheDisseminationTask
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
access_key |
protected org.jgroups.protocols.S3_PING.AWSAuthConnection |
conn |
protected java.lang.String |
host |
protected int |
port |
protected java.lang.String |
pre_signed_delete_url |
protected java.lang.String |
pre_signed_put_url |
protected java.lang.String |
prefix |
protected java.lang.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, write_data_on_find, 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 java.lang.String |
generatePreSignedUrl(java.lang.String awsAccessKey,
java.lang.String awsSecretAccessKey,
java.lang.String method,
java.lang.String bucket,
java.lang.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(java.util.List<Address> members,
java.lang.String clustername,
Responses responses) |
protected void |
readResponse(org.jgroups.protocols.S3_PING.GetResponse rsp,
java.util.List<Address> mbrs,
Responses responses) |
protected void |
remove(java.lang.String clustername,
Address addr) |
protected void |
removeAll(java.lang.String clustername)
Removes all files for the given cluster name
|
protected static java.lang.String |
sanitize(java.lang.String name)
Sanitizes bucket and folder names according to AWS guidelines
|
protected boolean |
usingPreSignedUrls() |
protected void |
validateProperties() |
protected void |
write(java.util.List<PingData> list,
java.lang.String clustername) |
addDiscoveryResponseToCaches, addressToFilename, deleteFile, down, findMembers, getLocation, getRemoveAllDataOnViewChange, handleView, isDynamic, isInfoWriterRunning, read, read, resetStats, setLocation, setRemoveAllDataOnViewChange, 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 java.lang.String host
protected int port
protected boolean use_ssl
protected java.lang.String access_key
protected java.lang.String secret_access_key
protected java.lang.String prefix
protected java.lang.String pre_signed_put_url
protected java.lang.String pre_signed_delete_url
protected boolean skip_bucket_existence_check
protected org.jgroups.protocols.S3_PING.AWSAuthConnection conn
public void init() throws java.lang.Exception
Protocol
protected org.jgroups.protocols.S3_PING.AWSAuthConnection createConnection()
protected void createRootDir()
createRootDir
in class FILE_PING
protected void readAll(java.util.List<Address> members, java.lang.String clustername, Responses responses)
protected void readResponse(org.jgroups.protocols.S3_PING.GetResponse rsp, java.util.List<Address> mbrs, Responses responses)
protected void write(java.util.List<PingData> list, java.lang.String clustername)
protected void remove(java.lang.String clustername, Address addr)
protected void removeAll(java.lang.String clustername)
FILE_PING
protected void validateProperties()
protected boolean usingPreSignedUrls()
protected static java.lang.String sanitize(java.lang.String name)
public static java.lang.String generatePreSignedUrl(java.lang.String awsAccessKey, java.lang.String awsSecretAccessKey, java.lang.String method, java.lang.String bucket, java.lang.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 © 1998-2020 Red Hat. All Rights Reserved.