Berkeley DB Java Edition Examples
version 4.1.21

je.rep.quote
Class StockQuotesRMIForwarding.WriteServicesImpl

java.lang.Object
  extended by je.rep.quote.StockQuotesRMIForwarding.WriteServicesImpl
All Implemented Interfaces:
Remote, StockQuotesRMIForwarding.WriteServices
Enclosing class:
StockQuotesRMIForwarding

public class StockQuotesRMIForwarding.WriteServicesImpl
extends Object
implements StockQuotesRMIForwarding.WriteServices

The class supplies the RMI implementation of the write methods.


Constructor Summary
StockQuotesRMIForwarding.WriteServicesImpl(PrintStream printStream)
           
 
Method Summary
 void update(je.rep.quote.Quote quote)
          The update operation invoked by a Replica on this Master.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StockQuotesRMIForwarding.WriteServicesImpl

public StockQuotesRMIForwarding.WriteServicesImpl(PrintStream printStream)
Method Detail

update

public void update(je.rep.quote.Quote quote)
            throws RemoteException
The update operation invoked by a Replica on this Master.

Note that this method is executed in an RMI thread and does not handle the environment failure level exceptions: InsufficientLogException and RollbackException exception in order to keep the example simple. Production code would handle the exception here and coordinate with the main thread of control and other RMI threads to take corrective actions and re-estabblish the environment and database handles.

Specified by:
update in interface StockQuotesRMIForwarding.WriteServices
Throws:
RemoteException

Berkeley DB Java Edition Examples
version 4.1.21

Copyright (c) 2004-2010 Oracle. All rights reserved.