com.sun.jini.mahalo
Class GroupTxnManagerImpl

java.lang.Object
  extended by com.sun.jini.mahalo.GroupTxnManagerImpl
All Implemented Interfaces:
com.sun.jini.admin.DestroyAdmin, com.sun.jini.constants.TimeConstants, com.sun.jini.landlord.Landlord, com.sun.jini.landlord.LocalLandlord, com.sun.jini.mahalo.log.LogRecovery, com.sun.jini.mahalo.TxnManager, com.sun.jini.start.ServiceProxyAccessor, java.rmi.Remote, net.jini.admin.Administrable, net.jini.admin.JoinAdmin, net.jini.core.transaction.server.TransactionConstants, net.jini.core.transaction.server.TransactionManager, net.jini.export.ProxyAccessor, net.jini.security.proxytrust.ServerProxyTrust

public class GroupTxnManagerImpl
extends java.lang.Object
implements com.sun.jini.mahalo.TxnManager, com.sun.jini.mahalo.log.LogRecovery, com.sun.jini.constants.TimeConstants, com.sun.jini.landlord.LocalLandlord, net.jini.security.proxytrust.ServerProxyTrust, net.jini.export.ProxyAccessor


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sun.jini.landlord.Landlord
com.sun.jini.landlord.Landlord.RenewResults
 
Nested classes/interfaces inherited from interface net.jini.core.transaction.server.TransactionManager
net.jini.core.transaction.server.TransactionManager.Created
 
Field Summary
protected  net.jini.export.Exporter exporter
          The exporter for exporting and unexporting
protected  javax.security.auth.login.LoginContext loginContext
          The login context, for logging out
protected  java.util.Map<java.lang.Long,GroupTxnManagerTransaction> txns
           
 
Fields inherited from interface com.sun.jini.mahalo.TxnManager
MAHALO
 
Fields inherited from interface net.jini.core.transaction.server.TransactionConstants
ABORTED, ACTIVE, COMMITTED, NOTCHANGED, PREPARED, VOTING
 
Fields inherited from interface com.sun.jini.constants.TimeConstants
DAYS, HOURS, MINUTES, SECONDS
 
Method Summary
 void abort(long id)
           
 void abort(long id, long waitFor)
           
 void addLookupAttributes(net.jini.core.entry.Entry[] attrSets)
           
 void addLookupGroups(java.lang.String[] groups)
           
 void addLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
           
 void cancel(net.jini.id.Uuid uuid)
          Cancels the lease on a Transaction.
 java.util.Map cancelAll(net.jini.id.Uuid[] cookies)
          Bulk cancel of leases on Transactions.
 void commit(long id)
           
 void commit(long id, long waitFor)
           
 net.jini.core.transaction.server.TransactionManager.Created create(long lease)
           
 void destroy()
          Cleans up and exits the transaction manager.
 java.lang.Object getAdmin()
          Returns the administration object for the transaction manager.
protected  com.sun.jini.mahalo.log.LogManager getLogManager()
          Getter method for LogManager.
 net.jini.core.entry.Entry[] getLookupAttributes()
           
 java.lang.String[] getLookupGroups()
           
 net.jini.core.discovery.LookupLocator[] getLookupLocators()
           
 java.lang.Object getProxy()
           
 net.jini.security.TrustVerifier getProxyVerifier()
           
 java.lang.Object getServiceProxy()
           
 int getState(long id)
           
protected  com.sun.jini.thread.TaskManager getTaskManager()
          Getter method for TaskManager.
 net.jini.core.transaction.Transaction getTransaction(long id)
          Method from TxnManager which produces a Transaction from its ID.
protected  com.sun.jini.thread.WakeupManager getWakeupManager()
          Getter method for WakeupManager.
protected  void initFailed(java.lang.Throwable e)
          Log information about failing to initialize the service and rethrow the appropriate exception.
 void join(long id, net.jini.core.transaction.server.TransactionParticipant part, long crashCount)
           
 net.jini.core.transaction.server.TransactionManager manager()
          Returns a reference to the TransactionManager interface.
 void modifyLookupAttributes(net.jini.core.entry.Entry[] attrSetTemplates, net.jini.core.entry.Entry[] attrSets)
           
 void noteUnsettledTxn(long tid)
          Informs the transaction manager to attempt to settle a given transaction.
 void recover(long cookie, com.sun.jini.mahalo.log.LogRecord rec)
          This method recovers state changes resulting from committing a transaction.
 void removeLookupGroups(java.lang.String[] groups)
           
 void removeLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
           
 long renew(net.jini.id.Uuid uuid, long extension)
          Requests the renewal of a lease on a Transaction.
 com.sun.jini.landlord.Landlord.RenewResults renewAll(net.jini.id.Uuid[] cookies, long[] extensions)
          Bulk renewal request of leases on Transactions.
 void setLookupGroups(java.lang.String[] groups)
           
 void setLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

txns

protected transient java.util.Map<java.lang.Long,GroupTxnManagerTransaction> txns

exporter

protected net.jini.export.Exporter exporter
The exporter for exporting and unexporting


loginContext

protected javax.security.auth.login.LoginContext loginContext
The login context, for logging out

Method Detail

create

public net.jini.core.transaction.server.TransactionManager.Created create(long lease)
                                                                   throws net.jini.core.lease.LeaseDeniedException
Specified by:
create in interface net.jini.core.transaction.server.TransactionManager
Throws:
net.jini.core.lease.LeaseDeniedException

join

public void join(long id,
                 net.jini.core.transaction.server.TransactionParticipant part,
                 long crashCount)
          throws net.jini.core.transaction.UnknownTransactionException,
                 net.jini.core.transaction.CannotJoinException,
                 net.jini.core.transaction.server.CrashCountException,
                 java.rmi.RemoteException
Specified by:
join in interface net.jini.core.transaction.server.TransactionManager
Throws:
net.jini.core.transaction.UnknownTransactionException
net.jini.core.transaction.CannotJoinException
net.jini.core.transaction.server.CrashCountException
java.rmi.RemoteException

getState

public int getState(long id)
             throws net.jini.core.transaction.UnknownTransactionException
Specified by:
getState in interface net.jini.core.transaction.server.TransactionManager
Throws:
net.jini.core.transaction.UnknownTransactionException

commit

public void commit(long id)
            throws net.jini.core.transaction.UnknownTransactionException,
                   net.jini.core.transaction.CannotCommitException,
                   java.rmi.RemoteException
Specified by:
commit in interface net.jini.core.transaction.server.TransactionManager
Throws:
net.jini.core.transaction.UnknownTransactionException
net.jini.core.transaction.CannotCommitException
java.rmi.RemoteException

commit

public void commit(long id,
                   long waitFor)
            throws net.jini.core.transaction.UnknownTransactionException,
                   net.jini.core.transaction.CannotCommitException,
                   net.jini.core.transaction.TimeoutExpiredException,
                   java.rmi.RemoteException
Specified by:
commit in interface net.jini.core.transaction.server.TransactionManager
Throws:
net.jini.core.transaction.UnknownTransactionException
net.jini.core.transaction.CannotCommitException
net.jini.core.transaction.TimeoutExpiredException
java.rmi.RemoteException

abort

public void abort(long id)
           throws net.jini.core.transaction.UnknownTransactionException,
                  net.jini.core.transaction.CannotAbortException
Specified by:
abort in interface net.jini.core.transaction.server.TransactionManager
Throws:
net.jini.core.transaction.UnknownTransactionException
net.jini.core.transaction.CannotAbortException

abort

public void abort(long id,
                  long waitFor)
           throws net.jini.core.transaction.UnknownTransactionException,
                  net.jini.core.transaction.CannotAbortException,
                  net.jini.core.transaction.TimeoutExpiredException
Specified by:
abort in interface net.jini.core.transaction.server.TransactionManager
Throws:
net.jini.core.transaction.UnknownTransactionException
net.jini.core.transaction.CannotAbortException
net.jini.core.transaction.TimeoutExpiredException

recover

public void recover(long cookie,
                    com.sun.jini.mahalo.log.LogRecord rec)
             throws com.sun.jini.mahalo.log.LogException
This method recovers state changes resulting from committing a transaction. This re-creates the internal representation of the transaction.

Specified by:
recover in interface com.sun.jini.mahalo.log.LogRecovery
Parameters:
cookie - the transaction's ID
rec - the LogRecord
Throws:
com.sun.jini.mahalo.log.LogException

noteUnsettledTxn

public void noteUnsettledTxn(long tid)
Informs the transaction manager to attempt to settle a given transaction.

Parameters:
tid - the transaction's ID

getTransaction

public net.jini.core.transaction.Transaction getTransaction(long id)
                                                     throws net.jini.core.transaction.UnknownTransactionException
Method from TxnManager which produces a Transaction from its ID.

Specified by:
getTransaction in interface com.sun.jini.mahalo.TxnManager
Parameters:
id - the ID
Throws:
net.jini.core.transaction.UnknownTransactionException
See Also:
Transaction, TxnManager

renew

public long renew(net.jini.id.Uuid uuid,
                  long extension)
           throws net.jini.core.lease.UnknownLeaseException,
                  net.jini.core.lease.LeaseDeniedException
Requests the renewal of a lease on a Transaction.

Specified by:
renew in interface com.sun.jini.landlord.Landlord
Specified by:
renew in interface com.sun.jini.landlord.LocalLandlord
Parameters:
cookie - identifies the leased resource
extension - requested lease extension
Throws:
net.jini.core.lease.UnknownLeaseException
net.jini.core.lease.LeaseDeniedException
See Also:
Lease, LeasedResource, LeaseManager

cancel

public void cancel(net.jini.id.Uuid uuid)
            throws net.jini.core.lease.UnknownLeaseException
Cancels the lease on a Transaction.

Specified by:
cancel in interface com.sun.jini.landlord.Landlord
Specified by:
cancel in interface com.sun.jini.landlord.LocalLandlord
Parameters:
cookie - identifies the leased resource
Throws:
net.jini.core.lease.UnknownLeaseException
See Also:
Lease, LeasedResource, LeaseManager

renewAll

public com.sun.jini.landlord.Landlord.RenewResults renewAll(net.jini.id.Uuid[] cookies,
                                                            long[] extensions)
Bulk renewal request of leases on Transactions.

Specified by:
renewAll in interface com.sun.jini.landlord.Landlord
Parameters:
cookies - identifies the leased resources
extensions - requested lease extensions
See Also:
Lease, LeasedResource, LeaseManager

cancelAll

public java.util.Map cancelAll(net.jini.id.Uuid[] cookies)
Bulk cancel of leases on Transactions.

Specified by:
cancelAll in interface com.sun.jini.landlord.Landlord
Parameters:
cookies - identifies the leased resources
See Also:
Lease, LeasedResource, LeaseManager

manager

public net.jini.core.transaction.server.TransactionManager manager()
Returns a reference to the TransactionManager interface.

Specified by:
manager in interface com.sun.jini.mahalo.TxnManager
See Also:
TransactionManager

destroy

public void destroy()
Cleans up and exits the transaction manager.

Specified by:
destroy in interface com.sun.jini.admin.DestroyAdmin

getAdmin

public java.lang.Object getAdmin()
Returns the administration object for the transaction manager.

Specified by:
getAdmin in interface net.jini.admin.Administrable

getLookupAttributes

public net.jini.core.entry.Entry[] getLookupAttributes()
Specified by:
getLookupAttributes in interface net.jini.admin.JoinAdmin

addLookupAttributes

public void addLookupAttributes(net.jini.core.entry.Entry[] attrSets)
Specified by:
addLookupAttributes in interface net.jini.admin.JoinAdmin

modifyLookupAttributes

public void modifyLookupAttributes(net.jini.core.entry.Entry[] attrSetTemplates,
                                   net.jini.core.entry.Entry[] attrSets)
Specified by:
modifyLookupAttributes in interface net.jini.admin.JoinAdmin

getLookupGroups

public java.lang.String[] getLookupGroups()
Specified by:
getLookupGroups in interface net.jini.admin.JoinAdmin

addLookupGroups

public void addLookupGroups(java.lang.String[] groups)
Specified by:
addLookupGroups in interface net.jini.admin.JoinAdmin

removeLookupGroups

public void removeLookupGroups(java.lang.String[] groups)
Specified by:
removeLookupGroups in interface net.jini.admin.JoinAdmin

setLookupGroups

public void setLookupGroups(java.lang.String[] groups)
Specified by:
setLookupGroups in interface net.jini.admin.JoinAdmin

getLookupLocators

public net.jini.core.discovery.LookupLocator[] getLookupLocators()
Specified by:
getLookupLocators in interface net.jini.admin.JoinAdmin

addLookupLocators

public void addLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
                       throws java.rmi.RemoteException
Specified by:
addLookupLocators in interface net.jini.admin.JoinAdmin
Throws:
java.rmi.RemoteException

removeLookupLocators

public void removeLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
                          throws java.rmi.RemoteException
Specified by:
removeLookupLocators in interface net.jini.admin.JoinAdmin
Throws:
java.rmi.RemoteException

setLookupLocators

public void setLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
                       throws java.rmi.RemoteException
Specified by:
setLookupLocators in interface net.jini.admin.JoinAdmin
Throws:
java.rmi.RemoteException

getProxy

public java.lang.Object getProxy()
Specified by:
getProxy in interface net.jini.export.ProxyAccessor

getServiceProxy

public java.lang.Object getServiceProxy()
Specified by:
getServiceProxy in interface com.sun.jini.start.ServiceProxyAccessor

initFailed

protected void initFailed(java.lang.Throwable e)
                   throws java.lang.Exception
Log information about failing to initialize the service and rethrow the appropriate exception.

Parameters:
e - the exception produced by the failure
Throws:
java.lang.Exception

getProxyVerifier

public net.jini.security.TrustVerifier getProxyVerifier()
Specified by:
getProxyVerifier in interface net.jini.security.proxytrust.ServerProxyTrust

getLogManager

protected com.sun.jini.mahalo.log.LogManager getLogManager()
Getter method for LogManager.


getTaskManager

protected com.sun.jini.thread.TaskManager getTaskManager()
Getter method for TaskManager.


getWakeupManager

protected com.sun.jini.thread.WakeupManager getWakeupManager()
Getter method for WakeupManager.



Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.