org.prevayler.implementation.publishing
Class CentralPublisher
java.lang.Object
org.prevayler.implementation.publishing.AbstractPublisher
org.prevayler.implementation.publishing.CentralPublisher
- All Implemented Interfaces:
- TransactionPublisher
public class CentralPublisher
- extends AbstractPublisher
Method Summary |
void |
close()
Closes any files or other system resources opened by this TransactionPublisher. |
void |
publish(Capsule capsule)
Publishes transaction to the subscribers synchronously. |
void |
subscribe(TransactionSubscriber subscriber,
long initialTransaction)
Updates the given subscriber with all transactions published since initialTransaction, returns and continues publishing all future transactions to him. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CentralPublisher
public CentralPublisher(Clock clock,
Journal journal)
publish
public void publish(Capsule capsule)
- 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.
subscribe
public void subscribe(TransactionSubscriber subscriber,
long initialTransaction)
throws IOException,
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.
- Throws:
IOException
ClassNotFoundException
close
public void close()
throws IOException
- Description copied from interface:
TransactionPublisher
- Closes any files or other system resources opened by this TransactionPublisher.
- Throws:
IOException
Copyright © 2001-2013. All Rights Reserved.