public class S3_PING extends FILE_PING
限定符和类型 | 字段和说明 |
---|---|
protected java.lang.String |
access_key |
protected com.fr.third.jgroups.protocols.S3_PING.AWSAuthConnection |
conn |
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 |
filter, interval, location, prev_view, reads, root_dir, SUFFIX, writes
always_send_physical_addr_with_discovery_request, async_discovery, 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, stagger_timeout, timeout, timer, transport_supports_multicasting, use_disk_cache, view, WHITESPACE
构造器和说明 |
---|
S3_PING() |
限定符和类型 | 方法和说明 |
---|---|
protected com.fr.third.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(com.fr.third.jgroups.protocols.S3_PING.GetResponse rsp,
java.util.List<Address> mbrs,
Responses responses) |
protected void |
remove(java.lang.String clustername,
Address addr) |
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, handleView, isDynamic, read, read, resetStats, write, writeAll
addResponse, addressAsString, addToCache, breakOnCoordResponse, breakOnCoordResponse, deserialize, discoveryRequestReceived, dumpCache, findInitialMembersAsString, findMembers, forceDiscoveryResponses, forceDiscoveryResponses, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getTimeout, getView, getViewId, handleConnect, handleDisconnect, handleDiscoveryResponse, isCoord, isMergeRunning, marshal, numInitialMembers, numInitialMembers, providedUpServices, readPingData, returnEntireCache, returnEntireCache, sendDiscoveryResponse, serializeWithoutView, setForceSendingDiscoveryRsps, setNumInitialMembers, setTimeout, staggerTimeout, staggerTimeout, start, stop, timeout, timeout, up, useDiskCache, useDiskCache
accept, destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, 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 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 com.fr.third.jgroups.protocols.S3_PING.AWSAuthConnection conn
public void init() throws java.lang.Exception
Protocol
protected com.fr.third.jgroups.protocols.S3_PING.AWSAuthConnection createConnection()
protected void createRootDir()
createRootDir
在类中 FILE_PING
protected void readAll(java.util.List<Address> members, java.lang.String clustername, Responses responses)
protected void readResponse(com.fr.third.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 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)
Here's how to generate the value for the pre_signed_put_url property: String putUrl = S3_PING.generatePreSignedUrl("abcd", "efgh", "put", "S3_Ping", "DemoCluster/node1", 1316286684);
Here's how to generate the value for the pre_signed_delete_url property: String deleteUrl = S3_PING.generatePreSignedUrl("abcd", "efgh", "delete", "S3_Ping", "DemoCluster/node1", 1316286684);
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 epoch