GigaSpaces XAP 7.0 API

org.openspaces.core.transaction.manager
Class TransactionLeaseRenewalConfig

java.lang.Object
  extended by org.openspaces.core.transaction.manager.TransactionLeaseRenewalConfig

public class TransactionLeaseRenewalConfig
extends Object

Allows to configure transactions to be renewed automatically when using AbstractJiniTransactionManager and its different sub-classes.

Will cause a transaction to be renewed each setRenewDuration(long) (which should be lower than the transaction timeout). Defaults to 2 seconds.

Allows also to set the setRenewRTT(long) which controls the expected round trip time to the server. Should be lower than the then the renew duration. Defaults to 1 second.

The transaciton renewal also allows to configure the pool size of renewal managers that will be used to renew transactions. It defaults to 1 and under heavy load of tranasctions with renewals should probably be higher.

Author:
kimchy

Constructor Summary
TransactionLeaseRenewalConfig()
           
 
Method Summary
 net.jini.lease.LeaseListener getLeaseListener()
          Sets an optional renew listener to be notified on renew events.
 int getPoolSize()
          The pool size value of lease renewal managers (responsible for renewing transactions).
 long getRenewDuration()
          Controls how often a transaction will be renewed (which should be lower than the transaction timeout).
 long getRenewRTT()
          Controls the expected round trip time to the server.
 void setLeaseListener(net.jini.lease.LeaseListener leaseListener)
          Sets an optional renew listener to be notified on renew events.
 void setPoolSize(int poolSize)
          The pool size value of lease renewal managers (responsible for renewing transactions).
 void setRenewDuration(long renewDuration)
          Controls how often a transaction will be renewed (which should be lower than the transaction timeout).
 void setRenewRTT(long renewRTT)
          Controls the expected round trip time to the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionLeaseRenewalConfig

public TransactionLeaseRenewalConfig()
Method Detail

getRenewDuration

public long getRenewDuration()
Controls how often a transaction will be renewed (which should be lower than the transaction timeout). This value is set in milliseconds and defaults to 2 seconds.


setRenewDuration

public void setRenewDuration(long renewDuration)
Controls how often a transaction will be renewed (which should be lower than the transaction timeout). This value is set in milliseconds and defaults to 2 seconds.


getRenewRTT

public long getRenewRTT()
Controls the expected round trip time to the server. This value is set in milliseconds and defaults to 1 second. The value should be lower than the renew duration.


setRenewRTT

public void setRenewRTT(long renewRTT)
Controls the expected round trip time to the server. This value is set in milliseconds and defaults to 1 second. The value should be lower than the renew duration.


getLeaseListener

public net.jini.lease.LeaseListener getLeaseListener()
Sets an optional renew listener to be notified on renew events.


setLeaseListener

public void setLeaseListener(net.jini.lease.LeaseListener leaseListener)
Sets an optional renew listener to be notified on renew events.


getPoolSize

public int getPoolSize()
The pool size value of lease renewal managers (responsible for renewing transactions). Defaults to 1 and under heavy load should be higher.


setPoolSize

public void setPoolSize(int poolSize)
The pool size value of lease renewal managers (responsible for renewing transactions). Defaults to 1 and under heavy load should be higher.


GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.