Prevayler™
The Free Software
Prevalence Layer

org.prevayler.implementation.replication
Class ClientPublisher

java.lang.Object
  extended byorg.prevayler.implementation.replication.ClientPublisher
All Implemented Interfaces:
TransactionPublisher

public class ClientPublisher
extends java.lang.Object
implements TransactionPublisher

Reserved for future implementation.


Constructor Summary
ClientPublisher(java.lang.String serverIpAddress, int serverPort)
           
 
Method Summary
 void addSubscriber(TransactionSubscriber subscriber, long initialTransaction)
          Updates the given subscriber with all transactions published since initialTransaction, returns and continues publishing all future transactions to him.
 Clock clock()
          Returns a Clock which is consistent with the Transaction publishing time.
 void close()
          Closes any files or other system resources opened by this TransactionPublisher.
 void publish(Transaction transaction)
          Publishes transaction to the subscribers synchronously.
 void removeSubscriber(TransactionSubscriber subscriber)
          Stops publishing future transactions to the given subscriber.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientPublisher

public ClientPublisher(java.lang.String serverIpAddress,
                       int serverPort)
                throws java.io.IOException
Method Detail

addSubscriber

public void addSubscriber(TransactionSubscriber subscriber,
                          long initialTransaction)
                   throws java.io.IOException,
                          java.lang.ClassNotFoundException
Description copied from interface: TransactionPublisher
Updates the given subscriber with all transactions published since initialTransaction, returns and continues publishing all future transactions to him.

Specified by:
addSubscriber in interface TransactionPublisher
Throws:
java.io.IOException
java.lang.ClassNotFoundException

removeSubscriber

public void removeSubscriber(TransactionSubscriber subscriber)
Description copied from interface: TransactionPublisher
Stops publishing future transactions to the given subscriber.

Specified by:
removeSubscriber in interface TransactionPublisher

publish

public void publish(Transaction transaction)
Description copied from interface: TransactionPublisher
Publishes transaction to the subscribers synchronously. This method will only return after all subscribers have received transaction. Note that no guarantee can be made as to wether the subscribers have actually executed it.

Specified by:
publish in interface TransactionPublisher

clock

public Clock clock()
Description copied from interface: TransactionPublisher
Returns a Clock which is consistent with the Transaction publishing time.

Specified by:
clock in interface TransactionPublisher

close

public void close()
           throws java.io.IOException
Description copied from interface: TransactionPublisher
Closes any files or other system resources opened by this TransactionPublisher.

Specified by:
close in interface TransactionPublisher
Throws:
java.io.IOException


'Prevayler' is a trademark of Klaus Wuestefeld.
Copyleft 2001-2004 Klaus Wuestefeld.