Annotation Interface EnableGatewaySenders
@Target(TYPE)
@Retention(RUNTIME)
@Inherited
@Documented
@Import({GatewaySenderBeanFactoryPostProcessor.class,GatewaySendersConfiguration.class})
public @interface EnableGatewaySenders
This
Annotation
is responsible for the configuration of multiple GatewaySenders
.
All properties set with this Annotation
will be used as the default values for all
GatewaySenders
configured within the gatewaySenders property.- Since:
- 2.2.0
- See Also:
-
Annotation
Documented
Inherited
Retention
Target
GatewayEventFilter
GatewayEventSubstitutionFilter
GatewayReceiver
GatewaySender
GatewaySender.OrderPolicy
GatewayTransportFilter
EnableGatewaySender
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionint
Configures the time, in milliseconds, that an object can be in the queue to be replicated before the configuredGatewwaySenders
log an alert.boolean
A boolean flag to indicate if the configuredGatewaySenders
should use conflate entries in each batch.int
Configures the maximum batch size that all configuredGatewaySenders
sends to the remote site.int
Configures the maximum batch time interval in milliseconds that all configuredGatewaySenders
wait before attempting to send a batch of queued objects to the remoteGatewayReceivers
.Configures theDiskStore
used by all configured GatewaySender GatewaySenders} when persisting theGatewaySenders
queue data.boolean
A boolean flag indicating whether all configuredGatewaySenders
should use synchronousDiskStore
writes.int
Configures the number of dispatcher threads that all configuredGatewaySenders
will try to use to dispatch the queued events.String[]
Configures the list ofGatewayEventFilters
to be applied to all configuredGatewaySenders
.Configures theGatewayEventSubstitutionFilter
used by all configuredGatewaySenders
.The list ofGatewaySenders
to be configured.boolean
A boolean flag indicating whether all configuredGatewaySenders
should be started automatically.int
Configures the maximum size in megabytes that all configuredGatewaySenders
queue may take in heap memory before overflowing to disk.Configures the ordering policy that all configuredGatewaySenders
will use when queueing entries to be replicated to a remoteGatewayReceiver
.boolean
A boolean} flag indicating whether all configuredGatewaySenders
should use parallel replication.boolean
A boolean flag indicating whether all configuredGatewaySenders
should use persistence.String[]
Configures the list ofRegion
names that will be configured for allGatewaySenders
.int
Configures the id of the remote distributed system (cluster) that all configuredGatewaySenders
will send their data to.int
Configures the socket buffer size in bytes for all configuredGatewaySenders
.int
Configures the amount of time in milliseconds that all configuredGatewaySenders
will wait to receive an acknowledgment from a remote site.String[]
Configures an in-order list ofGatewayTransportFilter
objects to be applied to all configuredGatewaySenders
.
-
Element Details
-
alertThreshold
int alertThresholdConfigures the time, in milliseconds, that an object can be in the queue to be replicated before the configuredGatewwaySenders
log an alert. Defaults toGatewaySenderConfiguration.DEFAULT_ALERT_THRESHOLD
. Alternatively use the spring.data.gemfire.gateway.sender.alert-threshold property in application.properties.- Default:
- 0
-
batchConflationEnabled
boolean batchConflationEnabledA boolean flag to indicate if the configuredGatewaySenders
should use conflate entries in each batch. This means, that a batch will never contain duplicate entries, as the batch will always only contain the latest value for a key. Defaults to false. Alternatively use the spring.data.gemfire.gateway.sender.batch-conflation-enabled property in application.properties.- Default:
- false
-
batchSize
int batchSizeConfigures the maximum batch size that all configuredGatewaySenders
sends to the remote site. This property works in conjunction with thebatchTimeInterval()
setting. AGatewaySender
will send when either the batch-size or batch-time-interval is reached. Defaults to 100. Alternatively use the spring.data.gemfire.gateway.sender.batch-size property in application.properties.- Default:
- 100
-
batchTimeInterval
int batchTimeIntervalConfigures the maximum batch time interval in milliseconds that all configuredGatewaySenders
wait before attempting to send a batch of queued objects to the remoteGatewayReceivers
. This property works in conjunction with thebatchSize()
setting. AGatewaySender
will send when either the batch-size or batch-time-interval is reached. Defaults to 1000. Alternatively use the spring.data.gemfire.gateway.sender.batch-time-interval property in application.properties.- Default:
- 1000
-
diskStoreReference
String diskStoreReferenceConfigures theDiskStore
used by all configured GatewaySender GatewaySenders} when persisting theGatewaySenders
queue data. This setting should be set when theEnableGatewaySender.persistent()
property is set to true. Defaults to "". Alternatively use the spring.data.gemfire.gateway.sender.diskstore-reference property in application.properties.- Default:
- ""
-
diskSynchronous
boolean diskSynchronousA boolean flag indicating whether all configuredGatewaySenders
should use synchronousDiskStore
writes. Defaults to true. Alternatively use the spring.data.gemfire.gateway.sender.disk-synchronous property in application.properties.- Default:
- true
-
dispatcherThreads
int dispatcherThreadsConfigures the number of dispatcher threads that all configuredGatewaySenders
will try to use to dispatch the queued events. Defaults to 5. Alternatively use the spring.data.gemfire.gateway.sender.dispatcher-threads property in application.properties.- Default:
- 5
-
eventFilters
String[] eventFiltersConfigures the list ofGatewayEventFilters
to be applied to all configuredGatewaySenders
.GatewayEventFilters
are used to filter out objects from the sending queue before dispatching them to remoteGatewayReceivers
. Defaults to empty list. Alternatively use the spring.data.gemfire.gateway.sender.event-filters property in application.properties.- Default:
- {}
-
eventSubstitutionFilter
String eventSubstitutionFilterConfigures theGatewayEventSubstitutionFilter
used by all configuredGatewaySenders
. TheGatewayEventSubstitutionFilter
is used to replace values on objects before they are enqueued for remote replication. Defaults toGatewaySenderConfiguration.DEFAULT_EVENT_SUBSTITUTION_FILTER
. Alternatively use the spring.data.gemfire.gateway.sender.event-substitution-filter property in application.properties.- Default:
- ""
-
gatewaySenders
EnableGatewaySender[] gatewaySendersThe list ofGatewaySenders
to be configured. If noGatewaySenders) are configured, a default {@link GatewaySender} will be created using the properties provided.
- Default:
- {}
-
manualStart
boolean manualStartA boolean flag indicating whether all configuredGatewaySenders
should be started automatically.Defaults to {@value @EnableGatewaySenderConfiguration.DEFAULT_MANUAL_START}. Alternatively use the spring.data.gemfire.gateway.sender.manual-start property in application.properties.
- Default:
- false
-
maximumQueueMemory
int maximumQueueMemoryConfigures the maximum size in megabytes that all configuredGatewaySenders
queue may take in heap memory before overflowing to disk. Defaults to 100. Alternatively use the spring.data.gemfire.gateway.sender.maximum-queue-memory property in application.properties.- Default:
- 100
-
orderPolicy
OrderPolicyType orderPolicyConfigures the ordering policy that all configuredGatewaySenders
will use when queueing entries to be replicated to a remoteGatewayReceiver
.There are three different ordering policies:
OrderPolicyType.KEY
- Order of events preserved on a per key basisOrderPolicyType.THREAD
- Order of events preserved by the thread that added the eventOrderPolicyType.PARTITION
- Order of events is preserved in order that they arrived in partitioned Region
OrderPolicyType.KEY
. Alternatively use the spring.data.gemfire.gateway.sender.order-policy property in application.properties.- Default:
- KEY
-
parallel
boolean parallelA boolean} flag indicating whether all configuredGatewaySenders
should use parallel replication. Parallel replication means that eachCacheServer
that defines aGatewaySender
will send data to a remoteGatewayReceiver
. Defaults to false. Alternatively use the spring.data.gemfire.gateway.sender.parallel property in application.properties.- Default:
- false
-
persistent
boolean persistentA boolean flag indicating whether all configuredGatewaySenders
should use persistence. This setting should be used in conjunction with the disk-store-reference property. Defaults to false. Alternatively use the spring.data.gemfire.gateway.sender.persistent property in application.properties.- Default:
- false
-
regions
String[] regionsConfigures the list ofRegion
names that will be configured for allGatewaySenders
. An empty list denotes that ALLRegions
are to be replicated to the remoteGatewayReceiver
. Defaults to empty list. Alternatively use the spring.data.gemfire.gateway.sender.region-names property in application.properties.- Default:
- {}
-
remoteDistributedSystemId
int remoteDistributedSystemIdConfigures the id of the remote distributed system (cluster) that all configuredGatewaySenders
will send their data to. Defaults to {@value @EnableGatewaySenderConfiguration.DEFAULT_REMOTE_DISTRIBUTED_SYSTEM_ID}. Alternatively use the spring.data.gemfire.gateway.sender.remote-distributed-system-id property in application.properties.- Default:
- -1
-
socketBufferSize
int socketBufferSizeConfigures the socket buffer size in bytes for all configuredGatewaySenders
. Defaults to 524288. Alternatively use the spring.data.gemfire.gateway.sender.socket-buffer-size property in application.properties.- Default:
- 524288
-
socketReadTimeout
int socketReadTimeoutConfigures the amount of time in milliseconds that all configuredGatewaySenders
will wait to receive an acknowledgment from a remote site. By default this is set to 0, which means there is no timeout. The minimum allowed timeout is 30000 (milliseconds). Defaults to 0. Alternatively use the spring.data.gemfire.gateway.sender.socket-read-timeout property in application.properties.- Default:
- 0
-
transportFilters
String[] transportFiltersConfigures an in-order list ofGatewayTransportFilter
objects to be applied to all configuredGatewaySenders
. Defaults to empty list. Alternatively use the spring.data.gemfire.gateway.sender.transport-filters property in application.properties.- Default:
- {}
-