org.jgroups.protocols
Class SWIFT_PING

java.lang.Object
  extended by org.jgroups.stack.Protocol
      extended by org.jgroups.protocols.Discovery
          extended by org.jgroups.protocols.FILE_PING
              extended by org.jgroups.protocols.SWIFT_PING

public class SWIFT_PING
extends FILE_PING

Discovery protocol based on Openstack Swift (object storage).

This implementation is derived from Gustavo Fernandes work on RACKSPACE_PING

Since:
3.1
Author:
tsegismont

Nested Class Summary
protected static class SWIFT_PING.SwiftClient
          A thread safe Swift client
 
Nested classes/interfaces inherited from class org.jgroups.protocols.FILE_PING
FILE_PING.WriterTask
 
Nested classes/interfaces inherited from class org.jgroups.protocols.Discovery
Discovery.Responses
 
Field Summary
protected  java.lang.String auth_type
           
protected  java.lang.String auth_url
           
protected  java.lang.String container
           
protected  java.lang.String password
           
protected  SWIFT_PING.SwiftClient swiftClient
           
protected  java.lang.String tenant
           
protected  java.lang.String username
           
 
Fields inherited from class org.jgroups.protocols.FILE_PING
filter, interval, location, root_dir, SUFFIX
 
Fields inherited from class org.jgroups.protocols.Discovery
break_on_coord_rsp, current_coord, force_sending_discovery_rsps, group_addr, is_coord, is_leaving, is_server, local_addr, members, num_discovery_requests, num_initial_members, num_initial_srv_members, ping_responses, return_entire_cache, stagger_timeout, timeout, timer, use_disk_cache, view
 
Fields inherited from class org.jgroups.stack.Protocol
down_prot, ergonomics, id, name, stack, stats, up_prot
 
Constructor Summary
SWIFT_PING()
           
 
Method Summary
protected  void createRootDir()
           
 void init()
          Called after instance has been created (null constructor) and before protocol is started.
protected  java.util.List<PingData> readAll(java.lang.String clustername)
          Reads all information from the given directory under clustername
protected  void remove(java.lang.String clustername, Address addr)
           
protected  void writeToFile(PingData data, java.lang.String clustername)
           
 
Methods inherited from class org.jgroups.protocols.FILE_PING
addressAsString, down, fetchClusterMembers, handleView, isDynamic, sendDiscoveryRequestsInParallel, start, stop
 
Methods inherited from class org.jgroups.protocols.Discovery
deserialize, discoveryRequestReceived, findAllViews, findAllViewsAsString, findInitialMembers, findInitialMembersAsString, findMembers, getCurrentCoord, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getTimeout, getView, getViewId, handleConnect, handleDisconnect, isMergeRunning, providedUpServices, resetStats, sendDiscoveryRequest, sendDiscoveryResponse, sendMcastDiscoveryRequest, serializeWithoutView, setForceSendingDiscoveryRsps, setNumInitialMembers, setTimeout, up
 
Methods inherited from class org.jgroups.stack.Protocol
destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, printStats, providedDownServices, requiredDownServices, requiredUpServices, resetStatistics, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

swiftClient

protected SWIFT_PING.SwiftClient swiftClient

auth_url

protected java.lang.String auth_url

auth_type

protected java.lang.String auth_type

tenant

protected java.lang.String tenant

username

protected java.lang.String username

password

protected java.lang.String password

container

protected java.lang.String container
Constructor Detail

SWIFT_PING

public SWIFT_PING()
Method Detail

init

public void init()
          throws java.lang.Exception
Description copied from class: Protocol
Called after instance has been created (null constructor) and before protocol is started. Properties are already set. Other protocols are not yet connected and events cannot yet be sent.

Overrides:
init in class FILE_PING
Throws:
java.lang.Exception - Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the channel constructor will throw an exception

remove

protected void remove(java.lang.String clustername,
                      Address addr)
Overrides:
remove in class FILE_PING

readAll

protected java.util.List<PingData> readAll(java.lang.String clustername)
Description copied from class: FILE_PING
Reads all information from the given directory under clustername

Overrides:
readAll in class FILE_PING
Returns:

writeToFile

protected void writeToFile(PingData data,
                           java.lang.String clustername)
Overrides:
writeToFile in class FILE_PING

createRootDir

protected void createRootDir()
Overrides:
createRootDir in class FILE_PING


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.