Class SiteToSiteClient.StandardSiteToSiteClientConfig

java.lang.Object
org.apache.nifi.remote.client.SiteToSiteClient.StandardSiteToSiteClientConfig
All Implemented Interfaces:
Serializable, SiteToSiteClientConfig
Enclosing interface:
SiteToSiteClient

public static class SiteToSiteClient.StandardSiteToSiteClientConfig extends Object implements SiteToSiteClientConfig, Serializable
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • urls

      private final Set<String> urls
    • timeoutNanos

      private final long timeoutNanos
    • penalizationNanos

      private final long penalizationNanos
    • idleExpirationNanos

      private final long idleExpirationNanos
    • contentsCacheExpirationMillis

      private final long contentsCacheExpirationMillis
    • sslContext

      private final SSLContext sslContext
    • keystoreFilename

      private final String keystoreFilename
    • keystorePass

      private final String keystorePass
    • keystoreType

      private final KeystoreType keystoreType
    • truststoreFilename

      private final String truststoreFilename
    • truststorePass

      private final String truststorePass
    • truststoreType

      private final KeystoreType truststoreType
    • eventReporter

      private final EventReporter eventReporter
    • peerPersistenceFile

      private final File peerPersistenceFile
    • stateManager

      private final transient StateManager stateManager
    • useCompression

      private final boolean useCompression
    • transportProtocol

      private final SiteToSiteTransportProtocol transportProtocol
    • portName

      private final String portName
    • portIdentifier

      private final String portIdentifier
    • batchCount

      private final int batchCount
    • batchSize

      private final long batchSize
    • batchNanos

      private final long batchNanos
    • httpProxy

      private final HttpProxy httpProxy
    • localAddress

      private final InetAddress localAddress
  • Constructor Details

    • StandardSiteToSiteClientConfig

      private StandardSiteToSiteClientConfig()
    • StandardSiteToSiteClientConfig

      private StandardSiteToSiteClientConfig(SiteToSiteClient.Builder builder)
  • Method Details

    • isUseCompression

      public boolean isUseCompression()
      Specified by:
      isUseCompression in interface SiteToSiteClientConfig
      Returns:
      a boolean indicating whether or not compression will be used to transfer data to and from the remote instance
    • getUrls

      public Set<String> getUrls()
      Description copied from interface: SiteToSiteClientConfig
      SiteToSite implementations should support multiple URLs when establishing a SiteToSite connection with a remote NiFi instance to provide robust connectivity so that it can keep working as long as at least one of the configured URLs is accessible.
      Specified by:
      getUrls in interface SiteToSiteClientConfig
      Returns:
      the configured URLs for the remote NiFi instances.
    • getTimeout

      public long getTimeout(TimeUnit timeUnit)
      Specified by:
      getTimeout in interface SiteToSiteClientConfig
      Parameters:
      timeUnit - unit over which to report the timeout
      Returns:
      the communications timeout in given unit
    • getCacheExpiration

      public long getCacheExpiration(TimeUnit timeUnit)
      Description copied from interface: SiteToSiteClientConfig
      When the contents of a remote NiFi instance are fetched, that information is cached so that many calls that are made in a short period of time do not overwhelm the remote NiFi instance. This method will indicate the number of milliseconds that this information can be cached.
      Specified by:
      getCacheExpiration in interface SiteToSiteClientConfig
      Parameters:
      timeUnit - the desired time unit
      Returns:
      the number of milliseconds that the contents of a remote NiFi instance will be cached
    • getIdleConnectionExpiration

      public long getIdleConnectionExpiration(TimeUnit timeUnit)
      Specified by:
      getIdleConnectionExpiration in interface SiteToSiteClientConfig
      Parameters:
      timeUnit - the unit for which to report the time
      Returns:
      the amount of time that a connection can remain idle before it is "expired" and shut down
    • getSslContext

      public SSLContext getSslContext()
      Specified by:
      getSslContext in interface SiteToSiteClientConfig
      Returns:
      the SSL Context that is configured for this builder
    • getPortName

      public String getPortName()
      Specified by:
      getPortName in interface SiteToSiteClientConfig
      Returns:
      the name of the port that the client is to communicate with
    • getPortIdentifier

      public String getPortIdentifier()
      Specified by:
      getPortIdentifier in interface SiteToSiteClientConfig
      Returns:
      the identifier of the port that the client is to communicate with
    • getPenalizationPeriod

      public long getPenalizationPeriod(TimeUnit timeUnit)
      Specified by:
      getPenalizationPeriod in interface SiteToSiteClientConfig
      Parameters:
      timeUnit - unit over which to report the time
      Returns:
      the amount of time that a particular node will be ignored after a communications error with that node occurs
    • getPeerPersistenceFile

      public File getPeerPersistenceFile()
      Specified by:
      getPeerPersistenceFile in interface SiteToSiteClientConfig
      Returns:
      the file that is to be used for persisting the nodes of a remote cluster, if any
    • getStateManager

      public StateManager getStateManager()
      Specified by:
      getStateManager in interface SiteToSiteClientConfig
      Returns:
      the StateManager to be used for persisting the nodes of a remote
    • getPeerPersistence

      public PeerPersistence getPeerPersistence()
      Specified by:
      getPeerPersistence in interface SiteToSiteClientConfig
      Returns:
      a PeerPersistence implementation based on configured persistent target
    • getEventReporter

      public EventReporter getEventReporter()
      Specified by:
      getEventReporter in interface SiteToSiteClientConfig
      Returns:
      the EventReporter that is to be used by clients to report events
    • getPreferredBatchDuration

      public long getPreferredBatchDuration(TimeUnit timeUnit)
      Description copied from interface: SiteToSiteClientConfig
      When pulling data from a NiFi instance, the sender chooses how large a Transaction is. However, the client has the ability to request a particular batch size/duration.
      Specified by:
      getPreferredBatchDuration in interface SiteToSiteClientConfig
      Parameters:
      timeUnit - unit of time over which to report the duration
      Returns:
      the maximum amount of time that we will request a NiFi instance to send data to us in a Transaction
    • getPreferredBatchSize

      public long getPreferredBatchSize()
      Description copied from interface: SiteToSiteClientConfig
      When pulling data from a NiFi instance, the sender chooses how large a Transaction is. However, the client has the ability to request a particular batch size/duration.
      Specified by:
      getPreferredBatchSize in interface SiteToSiteClientConfig
      Returns:
      returns the maximum number of bytes that we will request a NiFi instance to send data to us in a Transaction
    • getPreferredBatchCount

      public int getPreferredBatchCount()
      Description copied from interface: SiteToSiteClientConfig
      When pulling data from a NiFi instance, the sender chooses how large a Transaction is. However, the client has the ability to request a particular batch size/duration.
      Specified by:
      getPreferredBatchCount in interface SiteToSiteClientConfig
      Returns:
      the maximum number of DataPackets that we will request a NiFi instance to send data to us in a Transaction
    • getKeystoreFilename

      public String getKeystoreFilename()
      Specified by:
      getKeystoreFilename in interface SiteToSiteClientConfig
      Returns:
      the filename to use for the keystore, or null if none is configured
    • getKeystorePassword

      public String getKeystorePassword()
      Specified by:
      getKeystorePassword in interface SiteToSiteClientConfig
      Returns:
      the password to use for the keystore, or null if none is configured
    • getKeystoreType

      public KeystoreType getKeystoreType()
      Specified by:
      getKeystoreType in interface SiteToSiteClientConfig
      Returns:
      the Type of the keystore, or null if none is configured
    • getTruststoreFilename

      public String getTruststoreFilename()
      Specified by:
      getTruststoreFilename in interface SiteToSiteClientConfig
      Returns:
      the filename to use for the truststore, or null if none is configured
    • getTruststorePassword

      public String getTruststorePassword()
      Specified by:
      getTruststorePassword in interface SiteToSiteClientConfig
      Returns:
      the password to use for the truststore, or null if none is configured
    • getTruststoreType

      public KeystoreType getTruststoreType()
      Specified by:
      getTruststoreType in interface SiteToSiteClientConfig
      Returns:
      the type of the truststore, or null if none is configured
    • getTransportProtocol

      public SiteToSiteTransportProtocol getTransportProtocol()
      Specified by:
      getTransportProtocol in interface SiteToSiteClientConfig
      Returns:
      a transport protocol to use
    • getHttpProxy

      public HttpProxy getHttpProxy()
      Description copied from interface: SiteToSiteClientConfig
      Return Proxy for HTTP Transport Protocol.
      Specified by:
      getHttpProxy in interface SiteToSiteClientConfig
      Returns:
      proxy or null if not specified
    • getLocalAddress

      public InetAddress getLocalAddress()
      Specified by:
      getLocalAddress in interface SiteToSiteClientConfig
      Returns:
      the InetAddress to bind to for the local address when creating a socket, or null to bind to the anyLocal address.