er.extensions.remoteSynchronizer
Class ERXSimpleMulticastSynchronizer
java.lang.Object
er.extensions.remoteSynchronizer.ERXRemoteSynchronizer
er.extensions.remoteSynchronizer.ERXSimpleMulticastSynchronizer
public class ERXSimpleMulticastSynchronizer
- extends ERXRemoteSynchronizer
This is a simple implementation of a remote synchronizer. It does a multicast
notification to other members of the group. You should probably be looking
at ERJGroupsSynchronizer framework instead, though, which is a much more
robust implementation on top of the JGroups framework. This one will get
you by in a pinch, but multicast communication is an unreliable protocol
by definition, and this implementation provides no facilities to recover from
that unreliability.
- Author:
- mschrag
Properties |
er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators | you should set this property to at least "1" to trigger ERXObjectStoreCoordinatorSynchronizer to turn on |
er.extensions.remoteSynchronizer.enabled | if true, remote synchronization is enabled |
er.extensions.remoteSynchronizer | "er.extensions.ERXSimpleMulticastSynchronizer" for this implementation |
er.extensions.multicastSynchronizer.localBindAddress | the local address to bind to |
er.extensions.multicastSynchronizer.group | the multicast address to send to |
er.extensions.multicastSynchronizer.port | the multicast port to send to |
er.extensions.multicastSynchronizer.whitelist | the comma-separated list of addresses that can send to this group |
er.extensions.multicastSynchronizer.maxPacketSize | the maximum multicast packet size |
er.extensions.multicastSynchronizer.identifier | the unique identifier for this host (autogenerated by default) |
er.extensions.remoteSynchronizer.includeEntities | the list of entities to synchronize (all by default) |
er.extensions.remoteSynchronizer.excludeEntities | the list of entities to NOT synchronize (none by default) |
Methods inherited from class er.extensions.remoteSynchronizer.ERXRemoteSynchronizer |
_readCacheChange, _readGID, _writeCacheChange, addChange, filteredCacheChanges, globalIDsGroupedByEntity, newRemoteSynchronizer, readGID, readGIDs, readKey, remoteSynchronizerEnabled, shouldSynchronizeEntity, writeCacheChanges, writeGID, writeGIDKeys, writeGIDs, writeKey, writeSnapshotCacheChange |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IDENTIFIER_LENGTH
public static final int IDENTIFIER_LENGTH
- See Also:
- Constant Field Values
ERXSimpleMulticastSynchronizer
public ERXSimpleMulticastSynchronizer(ERXObjectStoreCoordinatorSynchronizer.IChangeListener listener)
throws java.io.IOException
- Throws:
java.io.IOException
join
public void join()
throws java.io.IOException
- Specified by:
join
in class ERXRemoteSynchronizer
- Throws:
java.io.IOException
leave
public void leave()
throws java.io.IOException
- Specified by:
leave
in class ERXRemoteSynchronizer
- Throws:
java.io.IOException
handleMessageType
protected boolean handleMessageType(int messageType,
ERXObjectStoreCoordinatorSynchronizer.RemoteChange remoteChange,
java.io.DataInputStream dis)
- Overrides:
handleMessageType
in class ERXRemoteSynchronizer
listen
public void listen()
throws java.io.IOException
- Specified by:
listen
in class ERXRemoteSynchronizer
- Throws:
java.io.IOException
_writeCacheChanges
protected void _writeCacheChanges(int transactionID,
com.webobjects.foundation.NSArray cacheChanges)
throws java.io.IOException
- Specified by:
_writeCacheChanges
in class ERXRemoteSynchronizer
- Throws:
java.io.IOException
writeCacheChange
public void writeCacheChange(ERXDatabase.CacheChange cacheChange,
int transactionID,
short transactionNum,
short transactionSize)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2002 – 2007 Project Wonder.