Mercurial > hg > blitz_condensed
diff src/org/dancres/blitz/remote/BackEndSpace.java @ 0:3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Sat, 21 Mar 2009 11:00:06 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/dancres/blitz/remote/BackEndSpace.java Sat Mar 21 11:00:06 2009 +0000 @@ -0,0 +1,48 @@ +package org.dancres.blitz.remote; + +import net.jini.core.lease.Lease; +import net.jini.core.transaction.Transaction; +import net.jini.core.transaction.TransactionException; +import net.jini.core.event.EventRegistration; +import net.jini.core.event.RemoteEventListener; +import org.dancres.blitz.mangler.MangledEntry; + +import java.rmi.RemoteException; +import java.rmi.MarshalledObject; + +/** + */ +public interface BackEndSpace { + public LeaseImpl write(MangledEntry anEntry, Transaction aTxn, + long aLeaseTime) + throws RemoteException, TransactionException; + + public MangledEntry take(MangledEntry anEntry, Transaction aTxn, + long aWaitTime) + throws RemoteException, TransactionException; + + public MangledEntry read(MangledEntry anEntry, Transaction aTxn, + long aWaitTime) + throws RemoteException, TransactionException; + + public MangledEntry takeIfExists(MangledEntry anEntry, Transaction aTxn, + long aWaitTime) + throws RemoteException, TransactionException; + + public MangledEntry readIfExists(MangledEntry anEntry, Transaction aTxn, + long aWaitTime) + throws RemoteException, TransactionException; + + public EventRegistration notify(MangledEntry anEntry, Transaction aTxn, + RemoteEventListener aListener, + long aLeaseTime, + MarshalledObject aHandback) + throws RemoteException, TransactionException; + + /** + Used by the base proxy (which implements Administrable) to return + a proxy for the admin functions. Saves sending the admin proxy to + clients that don't intend to use it. + */ + public Object getAdmin() throws RemoteException; +}