public class TransactionLeaseRenewalConfig extends Object
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 transaction 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 transactions with renewals should probably be higher.
Constructor and Description |
---|
TransactionLeaseRenewalConfig() |
Modifier and Type | Method and Description |
---|---|
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(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.
|
public long getRenewDuration()
public void setRenewDuration(long renewDuration)
public long getRenewRTT()
public void setRenewRTT(long renewRTT)
public LeaseListener getLeaseListener()
public void setLeaseListener(LeaseListener leaseListener)
public int getPoolSize()
public void setPoolSize(int poolSize)
Copyright © GigaSpaces.