Package org.apache.openjpa.event
Class DynamicTCPRemoteCommitProvider
- java.lang.Object
-
- org.apache.openjpa.event.AbstractRemoteCommitProvider
-
- org.apache.openjpa.event.TCPRemoteCommitProvider
-
- org.apache.openjpa.event.DynamicTCPRemoteCommitProvider
-
- All Implemented Interfaces:
RemoteCommitProvider
,Configurable
,Closeable
- Direct Known Subclasses:
KubernetesTCPRemoteCommitProvider
public abstract class DynamicTCPRemoteCommitProvider extends TCPRemoteCommitProvider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.openjpa.event.TCPRemoteCommitProvider
TCPRemoteCommitProvider.HostAddress
-
-
Field Summary
-
Fields inherited from class org.apache.openjpa.event.TCPRemoteCommitProvider
_addresses, _addressesLock, _port, s_loc
-
Fields inherited from class org.apache.openjpa.event.AbstractRemoteCommitProvider
eventManager, log
-
-
Constructor Summary
Constructors Constructor Description DynamicTCPRemoteCommitProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
endConfiguration()
Subclasses that need to perform actions inConfigurable.endConfiguration()
must invoke this method.protected abstract java.util.List<java.lang.String>
fetchDynamicAddresses()
int
getCacheDurationMillis()
void
setAddresses(java.lang.String names)
Sets the list of addresses of peers to which this provider will send events to.void
setCacheDurationMillis(int _cacheDurationMillis)
-
Methods inherited from class org.apache.openjpa.event.TCPRemoteCommitProvider
broadcast, close, getMaxIdle, getMaxTotal, getNumBroadcastThreads, getPort, getRecoveryTimeMillis, setMaxActive, setMaxIdle, setMaxTotal, setNumBroadcastThreads, setPort, setRecoveryTimeMillis
-
Methods inherited from class org.apache.openjpa.event.AbstractRemoteCommitProvider
fireEvent, setConfiguration, setRemoteCommitEventManager, startConfiguration
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.openjpa.lib.conf.Configurable
setConfiguration, startConfiguration
-
-
-
-
Method Detail
-
getCacheDurationMillis
public int getCacheDurationMillis()
-
setCacheDurationMillis
public void setCacheDurationMillis(int _cacheDurationMillis)
-
setAddresses
public final void setAddresses(java.lang.String names) throws java.net.UnknownHostException
Description copied from class:TCPRemoteCommitProvider
Sets the list of addresses of peers to which this provider will send events to. The peers are semicolon-separatednames
list in the form of "myhost1:portA;myhost2:portB".- Overrides:
setAddresses
in classTCPRemoteCommitProvider
- Parameters:
names
- the list of addresses of peers to which this provider will send events to- Throws:
java.net.UnknownHostException
- in case peer name cannot be resolved
-
endConfiguration
public void endConfiguration()
Description copied from class:TCPRemoteCommitProvider
Subclasses that need to perform actions inConfigurable.endConfiguration()
must invoke this method.- Specified by:
endConfiguration
in interfaceConfigurable
- Overrides:
endConfiguration
in classTCPRemoteCommitProvider
-
fetchDynamicAddresses
protected abstract java.util.List<java.lang.String> fetchDynamicAddresses()
-
-