GemFire 7.0

com.gemstone.gemfire.cache.wan
Interface GatewaySenderFactory


public interface GatewaySenderFactory

Factory to create SerialGatewaySender

Since:
7.0
See Also:
GatewaySender

Method Summary
 GatewaySenderFactory addGatewayEventFilter(GatewayEventFilter filter)
          Adds a GatewayEventFilter
 GatewaySenderFactory addGatewayTransportFilter(GatewayTransportFilter filter)
          Adds a GatewayTransportFilter
 GatewaySender create(String id, int remoteDSId)
          Creates SerialGatewaySender to communicate with remote distributed system
 GatewaySenderFactory removeGatewayEventFilter(GatewayEventFilter filter)
          Removes the provided GatewayEventFilter from this GatewaySender.
 GatewaySenderFactory removeGatewayTransportFilter(GatewayTransportFilter filter)
          Removes the provided GatewayTransportFilter from this GatewaySender.
 GatewaySenderFactory setAlertThreshold(int threshold)
          Sets the alert threshold for entries in a SerialGatewaySender 's queue.
 GatewaySenderFactory setBatchConflationEnabled(boolean isConflation)
          Sets whether to enable batch conflation for a SerialGatewaySender's queue.
 GatewaySenderFactory setBatchSize(int size)
          Sets the batch size for a SerialGatewaySender's queue.
 GatewaySenderFactory setBatchTimeInterval(int interval)
          Sets the batch time interval for a SerialGatewaySender's queue.
 GatewaySenderFactory setDiskStoreName(String name)
          Sets the disk store name for overflow or persistence
 GatewaySenderFactory setDiskSynchronous(boolean isSynchronous)
          Sets whether or not the writing to the disk is synchronous.
 GatewaySenderFactory setDispatcherThreads(int numThreads)
          Sets the number of dispatcher thread
 GatewaySenderFactory setManualStart(boolean start)
          Sets the manual start boolean property for this SerialGatewaySender.
 GatewaySenderFactory setMaximumQueueMemory(int maxQueueMemory)
          Sets the maximum amount of memory (in MB) for a SerialGatewaySender's queue.
 GatewaySenderFactory setOrderPolicy(Gateway.OrderPolicy policy)
          Sets the number of dispatcher thread
 GatewaySenderFactory setParallel(boolean isParallel)
          Indicates whether all VMs need to distribute events to remote site.
 GatewaySenderFactory setPersistenceEnabled(boolean isPersistence)
          Sets whether to enable persistence for a SerialGatewaySender's queue.
 GatewaySenderFactory setSocketBufferSize(int size)
          Sets the buffer size in bytes of the socket connection for this SerialGatewaySender.
 GatewaySenderFactory setSocketReadTimeout(int timeout)
          Sets the number of milliseconds to wait for a response from a GatewayReceiver before timing out the operation and trying another GatewayReceiver (if any are available).
 

Method Detail

setParallel

GatewaySenderFactory setParallel(boolean isParallel)
Indicates whether all VMs need to distribute events to remote site. In this case only the events originating in a particular VM will be in dispatched in order.

Parameters:
isParallel - boolean to indicate whether distribution policy is parallel

addGatewayEventFilter

GatewaySenderFactory addGatewayEventFilter(GatewayEventFilter filter)
Adds a GatewayEventFilter

Parameters:
filter - GatewayEventFilter

addGatewayTransportFilter

GatewaySenderFactory addGatewayTransportFilter(GatewayTransportFilter filter)
Adds a GatewayTransportFilter

Parameters:
filter - GatewayTransportFilter

setSocketBufferSize

GatewaySenderFactory setSocketBufferSize(int size)
Sets the buffer size in bytes of the socket connection for this SerialGatewaySender. The default is 32768 bytes.

Parameters:
size - The size in bytes of the socket buffer

setSocketReadTimeout

GatewaySenderFactory setSocketReadTimeout(int timeout)
Sets the number of milliseconds to wait for a response from a GatewayReceiver before timing out the operation and trying another GatewayReceiver (if any are available).

Parameters:
timeout - number of milliseconds to wait for a response from a GatewayReceiver
Throws:
IllegalArgumentException - if timeout is less than or equal to 0.

setDiskStoreName

GatewaySenderFactory setDiskStoreName(String name)
Sets the disk store name for overflow or persistence

Parameters:
name -

setDispatcherThreads

GatewaySenderFactory setDispatcherThreads(int numThreads)
Sets the number of dispatcher thread

Parameters:
numThreads -

setOrderPolicy

GatewaySenderFactory setOrderPolicy(Gateway.OrderPolicy policy)
Sets the number of dispatcher thread

Parameters:
policy -

setMaximumQueueMemory

GatewaySenderFactory setMaximumQueueMemory(int maxQueueMemory)
Sets the maximum amount of memory (in MB) for a SerialGatewaySender's queue.

Parameters:
maxQueueMemory - The maximum amount of memory (in MB) for a SerialGatewaySender's queue.

setBatchSize

GatewaySenderFactory setBatchSize(int size)
Sets the batch size for a SerialGatewaySender's queue.

Parameters:
size - The size of batches sent from a GatewaySender to its corresponding GatewayReceiver.

setBatchTimeInterval

GatewaySenderFactory setBatchTimeInterval(int interval)
Sets the batch time interval for a SerialGatewaySender's queue.

Parameters:
interval - The maximum time interval that can elapse before a partial batch is sent from a GatewaySender to its corresponding GatewayReceiver.

setBatchConflationEnabled

GatewaySenderFactory setBatchConflationEnabled(boolean isConflation)
Sets whether to enable batch conflation for a SerialGatewaySender's queue.

Parameters:
isConflation - Whether or not to enable batch conflation for batches sent from a GatewaySender to its corresponding GatewayReceiver.

setPersistenceEnabled

GatewaySenderFactory setPersistenceEnabled(boolean isPersistence)
Sets whether to enable persistence for a SerialGatewaySender's queue.

Parameters:
isPersistence - Whether to enable persistence for a SerialGatewaySender's queue

setAlertThreshold

GatewaySenderFactory setAlertThreshold(int threshold)
Sets the alert threshold for entries in a SerialGatewaySender 's queue.

Parameters:
threshold - the alert threshold for entries in a SerialGatewaySender's queue

setManualStart

GatewaySenderFactory setManualStart(boolean start)
Sets the manual start boolean property for this SerialGatewaySender.

Parameters:
start - the manual start boolean property for this SerialGatewaySender

setDiskSynchronous

GatewaySenderFactory setDiskSynchronous(boolean isSynchronous)
Sets whether or not the writing to the disk is synchronous.

Parameters:
isSynchronous - boolean if true indicates synchronous writes

removeGatewayEventFilter

GatewaySenderFactory removeGatewayEventFilter(GatewayEventFilter filter)
Removes the provided GatewayEventFilter from this GatewaySender.

Parameters:
filter -

removeGatewayTransportFilter

GatewaySenderFactory removeGatewayTransportFilter(GatewayTransportFilter filter)
Removes the provided GatewayTransportFilter from this GatewaySender.

Parameters:
filter -

create

GatewaySender create(String id,
                     int remoteDSId)
Creates SerialGatewaySender to communicate with remote distributed system

Parameters:
id - unique id for this SerialGatewaySender
remoteDSId - unique id representing the remote distributed system
Returns:
instance of SerialGatewaySender
Throws:
IllegalStateException - If the GatewaySender creation fails during validation due to mismatch of attributes of GatewaySender created on other nodes with same id

GemFire 7.0

Copyright © 1997-2012 VMware, Inc. All rights reserved.