Class FailoverTransport

    • Constructor Detail

      • FailoverTransport

        public FailoverTransport()
    • Method Detail

      • disposeTransport

        public final void disposeTransport​(Transport transport)
      • handleConnectionControl

        public final void handleConnectionControl​(ConnectionControl control)
      • getInitialReconnectDelay

        public long getInitialReconnectDelay()
      • setInitialReconnectDelay

        public void setInitialReconnectDelay​(long initialReconnectDelay)
      • getMaxReconnectDelay

        public long getMaxReconnectDelay()
      • setMaxReconnectDelay

        public void setMaxReconnectDelay​(long maxReconnectDelay)
      • getReconnectDelay

        public long getReconnectDelay()
      • setReconnectDelay

        public void setReconnectDelay​(long reconnectDelay)
      • getReconnectDelayExponent

        public double getReconnectDelayExponent()
      • setReconnectDelayExponent

        public void setReconnectDelayExponent​(double reconnectDelayExponent)
      • getConnectedTransport

        public Transport getConnectedTransport()
      • getConnectedTransportURI

        public URI getConnectedTransportURI()
      • getMaxReconnectAttempts

        public int getMaxReconnectAttempts()
      • setMaxReconnectAttempts

        public void setMaxReconnectAttempts​(int maxReconnectAttempts)
      • getStartupMaxReconnectAttempts

        public int getStartupMaxReconnectAttempts()
      • setStartupMaxReconnectAttempts

        public void setStartupMaxReconnectAttempts​(int startupMaxReconnectAttempts)
      • getTimeout

        public long getTimeout()
      • setTimeout

        public void setTimeout​(long timeout)
      • isRandomize

        public boolean isRandomize()
        Returns the randomize.
      • setRandomize

        public void setRandomize​(boolean randomize)
        randomize - The randomize to set.
      • isBackup

        public boolean isBackup()
      • setBackup

        public void setBackup​(boolean backup)
      • getBackupPoolSize

        public int getBackupPoolSize()
      • setBackupPoolSize

        public void setBackupPoolSize​(int backupPoolSize)
      • getCurrentBackups

        public int getCurrentBackups()
      • isTrackMessages

        public boolean isTrackMessages()
      • setTrackMessages

        public void setTrackMessages​(boolean trackMessages)
      • isTrackTransactionProducers

        public boolean isTrackTransactionProducers()
      • setTrackTransactionProducers

        public void setTrackTransactionProducers​(boolean trackTransactionProducers)
      • getMaxCacheSize

        public int getMaxCacheSize()
      • setMaxCacheSize

        public void setMaxCacheSize​(int maxCacheSize)
      • isPriorityBackup

        public boolean isPriorityBackup()
      • setPriorityBackup

        public void setPriorityBackup​(boolean priorityBackup)
      • setPriorityURIs

        public void setPriorityURIs​(String priorityURIs)
      • asyncRequest

        public FutureResponse asyncRequest​(Object command,
                                           ResponseCallback responseCallback)
                                    throws IOException
        Description copied from interface: Transport
        An asynchronous request response where the Receipt will be returned in the future. If responseCallback is not null, then it will be called when the response has been completed.
        Specified by:
        asyncRequest in interface Transport
        responseCallback - TODO
        the FutureResponse
      • add

        public void add​(boolean rebalance,
                        String u)
      • reconnect

        public void reconnect​(boolean rebalance)
      • narrow

        public <T> T narrow​(Class<T> target)
        Specified by:
        narrow in interface Transport
        the target
      • isUseExponentialBackOff

        public boolean isUseExponentialBackOff()
      • setUseExponentialBackOff

        public void setUseExponentialBackOff​(boolean useExponentialBackOff)
      • getRemoteAddress

        public String getRemoteAddress()
        Specified by:
        getRemoteAddress in interface Transport
        the remote address for this connection
      • isFaultTolerant

        public boolean isFaultTolerant()
        Description copied from interface: Transport
        Indicates if the transport can handle faults
        Specified by:
        isFaultTolerant in interface Transport
        true if fault tolerant
      • isPriority

        protected boolean isPriority​(URI uri)
      • isDisposed

        public boolean isDisposed()
        Specified by:
        isDisposed in interface Transport
        true if the transport is disposed
      • isConnected

        public boolean isConnected()
        Specified by:
        isConnected in interface Transport
        true if the transport is connected
      • isReconnectSupported

        public boolean isReconnectSupported()
        Specified by:
        isReconnectSupported in interface Transport
        true if reconnect is supported
      • setReconnectSupported

        public void setReconnectSupported​(boolean value)
      • isUpdateURIsSupported

        public boolean isUpdateURIsSupported()
        Specified by:
        isUpdateURIsSupported in interface Transport
        true if updating uris is supported
      • setUpdateURIsSupported

        public void setUpdateURIsSupported​(boolean value)
      • updateURIs

        public void updateURIs​(boolean rebalance,
                               URI[] updatedURIs)
                        throws IOException
        Description copied from interface: Transport
        Provide a list of available alternative locations
        Specified by:
        updateURIs in interface Transport
      • getUpdateURIsURL

        public String getUpdateURIsURL()
        the updateURIsURL
      • setUpdateURIsURL

        public void setUpdateURIsURL​(String updateURIsURL)
        updateURIsURL - the updateURIsURL to set
      • isRebalanceUpdateURIs

        public boolean isRebalanceUpdateURIs()
        the rebalanceUpdateURIs
      • setRebalanceUpdateURIs

        public void setRebalanceUpdateURIs​(boolean rebalanceUpdateURIs)
        rebalanceUpdateURIs - the rebalanceUpdateURIs to set
      • getReceiveCounter

        public int getReceiveCounter()
        Description copied from interface: Transport
        Returns a counter which gets incremented as data is read from the transport. It should only be used to determine if there is progress being made in reading the next command from the transport. The value may wrap into the negative numbers.
        Specified by:
        getReceiveCounter in interface Transport
        a counter which gets incremented as data is read from the transport.
      • getConnectFailures

        public int getConnectFailures()
      • connectionInterruptProcessingComplete

        public void connectionInterruptProcessingComplete​(ConnectionId connectionId)
      • isConnectedToPriority

        public boolean isConnectedToPriority()
      • setNestedExtraQueryOptions

        public void setNestedExtraQueryOptions​(String nestedExtraQueryOptions)
      • getWarnAfterReconnectAttempts

        public int getWarnAfterReconnectAttempts()
      • setWarnAfterReconnectAttempts

        public void setWarnAfterReconnectAttempts​(int warnAfterReconnectAttempts)
        Sets the number of Connect / Reconnect attempts that must occur before a warn message is logged indicating that the transport is not connected. This can be useful when the client is running inside some container or service as it give an indication of some problem with the client connection that might not otherwise be visible. To disable the log messages this value should be set to a value @{code attempts <= 0}
        warnAfterReconnectAttempts - The number of failed connection attempts that must happen before a warning is logged.
      • setPeerCertificates

        public void setPeerCertificates​(X509Certificate[] certificates)
        Description copied from interface: Transport
        Sets the certificates provided by the connected peer.
        Specified by:
        setPeerCertificates in interface Transport
        certificates - the Certificates provided by the peer.
      • getWireFormat

        public WireFormat getWireFormat()
        Description copied from interface: Transport
        Retrieves the WireFormat instance associated with this Transport instance.
        Specified by:
        getWireFormat in interface Transport
        the WireFormat in use.