VMware Tanzu GemFire .NET Client API Reference

VMware Tanzu GemFire .NET Client: ICacheFactory Interface Reference
VMware Tanzu GemFire .NET Client
ICacheFactory Interface Reference

This interface provides for the configuration and creation of instances of Cache. Setters and configuration methods all return ICacheFactory to enable use of the Builder pattern. More...

Inheritance diagram for ICacheFactory:
CacheFactory

Public Member Functions

ICache Create (string cacheName)
 Creation method intended to be called as final step of builder pattern. More...
 
ICacheFactory Set (string key, string value)
 Property key/value setter method for singular property configuration. More...
 
ICacheFactory SetPdxIgnoreUnreadFields (bool ignore)
 Setter for PdxIgnoreUnreadFields More...
 
ICacheFactory SetPdxReadSerialized (bool pdxReadSerialized)
 Setter for PdxReadSerialized More...
 
ICacheFactory SetAuthInitialize (IAuthInitialize authInitialize)
 Setter for AuthInitializer More...
 
ICacheFactory SetFreeConnectionTimeout (TimeSpan connectionTimeout)
 Sets the free connection timeout for this pool. More...
 
ICacheFactory SetLoadConditioningInterval (TimeSpan loadConditioningInterval)
 Sets the load conditioning interval for this pool. More...
 
ICacheFactory SetSocketBufferSize (int bufferSize)
 Sets the socket buffer size for each connection made in this pool. More...
 
ICacheFactory SetReadTimeout (TimeSpan timeout)
 Sets the time to wait for a response from a server before timing out the operation and trying another server (if any are available). More...
 
ICacheFactory SetMinConnections (int minConnections)
 Set the minimum number of connections to keep available at all times. More...
 
ICacheFactory SetMaxConnections (int maxConnections)
 Set the max number of client to server connections that the pool will create. More...
 
ICacheFactory SetIdleTimeout (TimeSpan idleTimeout)
 Set the amount of time a connection can be idle before expiring the connection. More...
 
ICacheFactory SetRetryAttempts (int retryAttempts)
 Set the number of times to retry a request after timeout/exception. More...
 
ICacheFactory SetPingInterval (TimeSpan pingInterval)
 Set how often to ping servers to verify that they are still alive. More...
 
ICacheFactory SetUpdateLocatorListInterval (TimeSpan updateLocatorListInterval)
 Set how often to update locator list from locator More...
 
ICacheFactory SetStatisticInterval (TimeSpan statisticInterval)
 Set how often to send client statistics to the server. More...
 
ICacheFactory SetServerGroup (string group)
 Configures the group that all servers this pool connects to must belong to. More...
 
ICacheFactory AddLocator (string host, int port)
 Add a locator, given its host and port, to this factory. More...
 
ICacheFactory AddServer (string host, int port)
 Add a server, given its host and port, to this factory. More...
 
ICacheFactory SetSniProxy (string hostname, int port)
 Set proxy info for SNI connection. More...
 
ICacheFactory SetSubscriptionEnabled (bool enabled)
 Enable subscriptions. More...
 
ICacheFactory SetPRSingleHopEnabled (bool enabled)
 By default SetPRSingleHopEnabled is true. More...
 
ICacheFactory SetSubscriptionRedundancy (int redundancy)
 Sets the redundancy level for this pools server-to-client subscriptions. More...
 
ICacheFactory SetSubscriptionMessageTrackingTimeout (TimeSpan messageTrackingTimeout)
 Sets the messageTrackingTimeout attribute which is the time-to-live period, in milliseconds, for subscription events the client has received from the server. More...
 
ICacheFactory SetSubscriptionAckInterval (TimeSpan ackInterval)
 Sets the is the interval in milliseconds to wait before sending acknowledgements to the bridge server for events received from the server subscriptions. More...
 
ICacheFactory Reset ()
 Resets the configuration of this factory to its defaults. More...
 

Detailed Description

This interface provides for the configuration and creation of instances of Cache. Setters and configuration methods all return ICacheFactory to enable use of the Builder pattern.

Member Function Documentation

◆ AddLocator()

ICacheFactory ICacheFactory.AddLocator ( string  host,
int  port 
)

Add a locator, given its host and port, to this factory.

The locator must be a server locator and will be used to discover other running bridge servers and locators.

host the host name or ip address that the locator is listening on.

port the port that the locator is listening on

throws GemFireIllegalArgumentException if host is an unknown host or if port is outside the valid range of [1..65535] inclusive.

throws GemFireIllegalArgumentException if a locator has already been added to this factory.

Implemented in CacheFactory.

◆ AddServer()

ICacheFactory ICacheFactory.AddServer ( string  host,
int  port 
)

Add a server, given its host and port, to this factory.

The server must be a bridge server and this client will directly connect to without consulting a server locator.

host the host name or ip address that the server is listening on.

port the port that the server is listening on

throws GemFireIllegalArgumentException if host is an unknown host or if port is outside the valid range of [1..65535] inclusive.

throws GemFireIllegalArgumentException if a server has already been added to this factory.

Implemented in CacheFactory.

◆ Create()

ICache ICacheFactory.Create ( string  cacheName)

Creation method intended to be called as final step of builder pattern.

Implemented in CacheFactory.

◆ Reset()

ICacheFactory ICacheFactory.Reset ( )

Resets the configuration of this factory to its defaults.

Implemented in CacheFactory.

◆ Set()

ICacheFactory ICacheFactory.Set ( string  key,
string  value 
)

Property key/value setter method for singular property configuration.

Parameters
keyProperty key
valueProperty value
Returns
ICacheFactory

Implemented in CacheFactory.

◆ SetAuthInitialize()

ICacheFactory ICacheFactory.SetAuthInitialize ( IAuthInitialize  authInitialize)

Setter for AuthInitializer

Parameters
authInitialize
Returns
ICacheFactory

Implemented in CacheFactory.

◆ SetFreeConnectionTimeout()

ICacheFactory ICacheFactory.SetFreeConnectionTimeout ( TimeSpan  connectionTimeout)

Sets the free connection timeout for this pool.

If the pool has a max connections setting, operations will block if all of the connections are in use. The free connection timeout specifies how long those operations will block waiting for a free connection before receiving an AllConnectionsInUseException. If max connections is not set this setting has no effect.

Exceptions
GemFireIllegalArgumentExceptiontimeout is less than or equal to TimeSpan.Zero

connectionTimeout the connection timeout

Implemented in CacheFactory.

◆ SetIdleTimeout()

ICacheFactory ICacheFactory.SetIdleTimeout ( TimeSpan  idleTimeout)

Set the amount of time a connection can be idle before expiring the connection.

If the pool size is greater than the minimum specified, connections which have been idle for longer than the idleTimeout will be closed.

Exceptions
GemFireIllegalArgumentExceptioninterval is a negative TimeSpan, less than TimeSpan.Zero

idleTimeout The amount of time that an idle connection should live before expiring. 0 indicates that connections should never expire.

Implemented in CacheFactory.

◆ SetLoadConditioningInterval()

ICacheFactory ICacheFactory.SetLoadConditioningInterval ( TimeSpan  loadConditioningInterval)

Sets the load conditioning interval for this pool.

This interval controls how frequently the pool will check to see if a connection to a given server should be moved to a different server to improve the load balance.

Exceptions
GemFireIllegalArgumentExceptioninterval is a negative TimeSpan, less than TimeSpan.Zero

loadConditioningInterval the connection lifetime @TODO: A value of 0 disables load conditioning.

Implemented in CacheFactory.

◆ SetMaxConnections()

ICacheFactory ICacheFactory.SetMaxConnections ( int  maxConnections)

Set the max number of client to server connections that the pool will create.

If all of the connections are in use, an operation requiring a client to server connection will block until a connection is available. see setFreeConnectionTimeout(int)

maxConnections the maximum number of connections in the pool. -1 indicates that there is no maximum number of connections.

throws GemFireIllegalArgumentException if maxConnections is less than minConnections.

Implemented in CacheFactory.

◆ SetMinConnections()

ICacheFactory ICacheFactory.SetMinConnections ( int  minConnections)

Set the minimum number of connections to keep available at all times.

When the pool is created, it will create this many connections. If 0 then connections will not be made until an actual operation is done that requires client-to-server communication.

minConnections the initial number of connections this pool will create.

throws GemFireIllegalArgumentException if minConnections is less than 0.

Implemented in CacheFactory.

◆ SetPdxIgnoreUnreadFields()

ICacheFactory ICacheFactory.SetPdxIgnoreUnreadFields ( bool  ignore)

Setter for PdxIgnoreUnreadFields

Parameters
ignore
Returns
ICacheFactory

Implemented in CacheFactory.

◆ SetPdxReadSerialized()

ICacheFactory ICacheFactory.SetPdxReadSerialized ( bool  pdxReadSerialized)

Setter for PdxReadSerialized

Parameters
pdxReadSerialized
Returns
ICacheFactory

Implemented in CacheFactory.

◆ SetPingInterval()

ICacheFactory ICacheFactory.SetPingInterval ( TimeSpan  pingInterval)

Set how often to ping servers to verify that they are still alive.

Each server will be sent a ping every pingInterval if there has not been any other communication with the server. These pings are used by the server to monitor the health of the client. Make sure that the pingInterval is less than the maximum time between pings allowed by the bridge server. see in CacheServer: setMaximumTimeBetweenPings(int)

Exceptions
GemFireIllegalArgumentExceptioninterval is a negative TimeSpan, less than TimeSpan.Zero

pingInterval The amount of time between pings.

Implemented in CacheFactory.

◆ SetPRSingleHopEnabled()

ICacheFactory ICacheFactory.SetPRSingleHopEnabled ( bool  enabled)

By default SetPRSingleHopEnabled is true.

The client is aware of the locations of partitions on servers hosting partitioned regions. Using this information, the client routes the client cache operations directly to the server which is hosting the required partition for the cache operation. If SetPRSingleHopEnabled is false the client can do an extra hop on servers to go to the required partition for that cache operation. The SetPRSingleHopEnabled avoids extra hops only for following cache operations : put, get and remove operations.

Implemented in CacheFactory.

◆ SetReadTimeout()

ICacheFactory ICacheFactory.SetReadTimeout ( TimeSpan  timeout)

Sets the time to wait for a response from a server before timing out the operation and trying another server (if any are available).

Exceptions
GemFireIllegalArgumentExceptiontimeout is less than or equal to TimeSpan.Zero

timeout to wait for a response from a server

Implemented in CacheFactory.

◆ SetRetryAttempts()

ICacheFactory ICacheFactory.SetRetryAttempts ( int  retryAttempts)

Set the number of times to retry a request after timeout/exception.

retryAttempts The number of times to retry a request after timeout/exception. -1 indicates that a request should be tried against every available server before failing.

throws GemFireIllegalArgumentException if idleTimout is less than 0.

Implemented in CacheFactory.

◆ SetServerGroup()

ICacheFactory ICacheFactory.SetServerGroup ( string  group)

Configures the group that all servers this pool connects to must belong to.

@TODO: group the server group that this pool will connect to. If null or "" then all servers will be connected to.

Implemented in CacheFactory.

◆ SetSniProxy()

ICacheFactory ICacheFactory.SetSniProxy ( string  hostname,
int  port 
)

Set proxy info for SNI connection.

Used for connecting via SNI proxy.

host the host name or ip address that the server is listening on.

port the port that the server is listening on.

Implemented in CacheFactory.

◆ SetSocketBufferSize()

ICacheFactory ICacheFactory.SetSocketBufferSize ( int  bufferSize)

Sets the socket buffer size for each connection made in this pool.

Large messages can be received and sent faster when this buffer is larger. Larger buffers also optimize the rate at which servers can send events for client subscriptions.

bufferSize the size of the socket buffers used for reading and writing on each connection in this pool.

throws GemFireIllegalArgumentException if bufferSize is less than or equal to 0.

Implemented in CacheFactory.

◆ SetStatisticInterval()

ICacheFactory ICacheFactory.SetStatisticInterval ( TimeSpan  statisticInterval)

Set how often to send client statistics to the server.

Doing this allows gfmon to monitor clients. A value of 0 disables the sending of client statistics to the server.

Exceptions
GemFireIllegalArgumentExceptioninterval is a negative TimeSpan, less than TimeSpan.Zero

statisticInterval The amount of time between sends of client statistics to the server.

Implemented in CacheFactory.

◆ SetSubscriptionAckInterval()

ICacheFactory ICacheFactory.SetSubscriptionAckInterval ( TimeSpan  ackInterval)

Sets the is the interval in milliseconds to wait before sending acknowledgements to the bridge server for events received from the server subscriptions.

Exceptions
GemFireIllegalArgumentExceptioninterval is a negative TimeSpan, less than TimeSpan.Zero

ackInterval wait before sending event acknowledgements.

Implemented in CacheFactory.

◆ SetSubscriptionEnabled()

ICacheFactory ICacheFactory.SetSubscriptionEnabled ( bool  enabled)

Enable subscriptions.

If set to true then the created pool will have server-to-client subscriptions enabled. If set to false then all Subscription* attributes are ignored at create time.

Implemented in CacheFactory.

◆ SetSubscriptionMessageTrackingTimeout()

ICacheFactory ICacheFactory.SetSubscriptionMessageTrackingTimeout ( TimeSpan  messageTrackingTimeout)

Sets the messageTrackingTimeout attribute which is the time-to-live period, in milliseconds, for subscription events the client has received from the server.

It's used to minimize duplicate events. Entries that have not been modified for this amount of time are expired from the list.

Exceptions
GemFireIllegalArgumentExceptioninterval is a negative TimeSpan, less than TimeSpan.Zero

messageTrackingTimeout

Implemented in CacheFactory.

◆ SetSubscriptionRedundancy()

ICacheFactory ICacheFactory.SetSubscriptionRedundancy ( int  redundancy)

Sets the redundancy level for this pools server-to-client subscriptions.

If 0 then no redundant copies will be kept on the servers. Otherwise an effort will be made to maintain the requested number of copies of the server-to-client subscriptions. At most one copy per server will be made up to the requested level.

redundancy the number of redundant servers for this client's subscriptions.

throws GemFireIllegalArgumentException if redundancyLevel is less than -1.

Implemented in CacheFactory.

◆ SetUpdateLocatorListInterval()

ICacheFactory ICacheFactory.SetUpdateLocatorListInterval ( TimeSpan  updateLocatorListInterval)

Set how often to update locator list from locator

Exceptions
GemFireIllegalArgumentExceptioninterval is a negative TimeSpan, less than TimeSpan.Zero

updateLocatorListInterval The amount of time between updating locator list. If its set to 0 then client will not update the locator list.

Implemented in CacheFactory.


The documentation for this interface was generated from the following file:
  • gemfire.client/Interfaces/ICacheFactory.cs