GigaSpaces XAP 9.7.2 API

com.sun.jini.mahalo
Class TxnManagerImpl

java.lang.Object
  extended by com.sun.jini.mahalo.TxnManagerImpl
All Implemented Interfaces:
DestroyAdmin, TimeConstants, Landlord, LocalLandlord, LeaseExpirationMgr.Expirer, LogRecovery, TxnManager, TxnSettler, ServiceProxyAccessor, Remote, Administrable, JoinAdmin, ExtendedTransactionManager, TransactionConstants, TransactionManager, ProxyAccessor, ServerProxyTrust

public class TxnManagerImpl
extends Object
implements TxnManager, LeaseExpirationMgr.Expirer, LogRecovery, TxnSettler, TimeConstants, LocalLandlord, ServerProxyTrust, ProxyAccessor

An implementation of the Jini(TM) Transaction Specification.

Author:
Sun Microsystems, Inc.

Nested Class Summary
static class TxnManagerImpl.IdGenT
           
 
Nested classes/interfaces inherited from interface com.sun.jini.landlord.Landlord
Landlord.RenewResults
 
Nested classes/interfaces inherited from interface net.jini.core.transaction.server.TransactionManager
TransactionManager.Created
 
Field Summary
protected  Exporter exporter
          The exporter for exporting and unexporting
protected  LoginContext loginContext
          The login context, for logging out
 
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_impl(Object id, long waitFor)
           
 void abort(long id)
          Abort the transaction.
 void abort(long id, long waitFor)
          Abort the transaction, waiting for participants to be notified of the decision.
 void abort(Object xid)
           
 void abort(Object xid, long waitFor)
           
 void addLookupAttributes(Entry[] attrSets)
          Add attribute sets for the service.
 void addLookupGroups(String[] groups)
          Add new groups to the set to join.
 void addLookupLocators(LookupLocator[] locators)
          Add locators for specific new lookup services to join.
 void cancel(Uuid uuid)
          Cancels the lease on a Transaction.
 Map cancelAll(Uuid[] cookies)
          Bulk cancel of leases on Transactions.
 void commit(long id)
          Commit the transaction.
 void commit(long id, long waitFor)
          Commit the transaction, waiting for participants to be notified of the decision.
 void commit(Object xid)
           
 void commit(Object xid, long waitFor)
           
 TransactionManager.Created create(long lease)
          Begin a new top-level transaction.
 TransactionManager.Created create(Object externalXid, long lease)
           
 void destroy()
          Cleans up and exits the transaction manager.
 boolean disJoin(long id, TransactionParticipant part)
          Remove a participant that was joined for a first time. called when a call to a participant returned empty so we can spare calling commit or abort on it, usually used in embedded mahalo
 boolean disJoin(Object id, TransactionParticipant part)
           
 Object getAdmin()
          Returns the administration object for the transaction manager.
 TransactionManager getLocalProxy()
           
 Entry[] getLookupAttributes()
          Get the current attribute sets for the service.
 String[] getLookupGroups()
          Get the list of groups to join.
 LookupLocator[] getLookupLocators()
          Get the list of locators of specific lookup services to join.
 Object getProxy()
          Returns a proxy object for this remote object.
 TrustVerifier getProxyVerifier()
          Returns a TrustVerifier that can be used to verify that a proxy can be trusted as a proxy for the service; that is, the isTrustedObject method of the returned verifier can be called with a candidate proxy.
 Object getServiceProxy()
          Returns a proxy object for this object.
 int getState(long id)
          Returns the current state of the given transaction.
 int getState(Object id)
           
 Transaction getTransaction(long id)
          Method from TxnManager which produces a Transaction from its ID.
 Uuid getTransactionManagerId()
           
protected  void initFailed(Throwable e)
          Log information about failing to initialize the service and rethrow the appropriate exception.
 void join(long id, TransactionParticipant part, long crashCount)
          Join a transaction that is managed by this transaction manager.
 void join(long id, TransactionParticipant part, long crashCount, int partitionId, String clusterName)
           
 void join(long id, TransactionParticipant part, long crashCount, ServerTransaction userXtnObject)
           
 void join(long id, TransactionParticipant part, long crashCount, ServerTransaction userXtnObject, int partitionId, String clusterName, Object clusterProxy)
           
 void join(Object xid, TransactionParticipant part, long crashCount)
           
 void join(Object xid, TransactionParticipant part, long crashCount, int partitionId, String clusterName)
           
 void join(Object xid, TransactionParticipant part, long crashCount, ServerTransaction userXtnObject)
           
 void join(Object xid, TransactionParticipant part, long crashCount, ServerTransaction userXtnObject, int partitionId, String clusterName, Object clusterProxy)
           
 TransactionManager manager()
          Returns a reference to the TransactionManager interface.
 void modifyLookupAttributes(Entry[] attrSetTemplates, Entry[] attrSets)
          Modify the current attribute sets, using the same semantics as ServiceRegistration.modifyAttributes.
 boolean needParticipantsJoin()
          returns true if this mgr which requires that the txn participants join into the txn in contrary to a mgr which the participants are known prior to txn propagation
 void noteUnsettledTxn(Object tid)
          Informs the transaction manager to attempt to settle a given transaction.
 int prepare(Object xid)
          prepare the underlying xtn designated by the rendered xid
 void recover(long cookie, LogRecord rec)
          This method recovers state changes resulting from committing a transaction.
 void reenterPreparedExternalXid(Object xid, List<TransactionParticipant> parts)
          given a prepared xid (retrieved from participants) reenlist it and its participants- used in XA
 void removeLookupGroups(String[] groups)
          Remove groups from the set to join.
 void removeLookupLocators(LookupLocator[] locators)
          Remove locators for specific lookup services from the set to join.
 long renew(Uuid uuid, long extension)
          Requests the renewal of a lease on a Transaction.
 Landlord.RenewResults renewAll(Uuid[] cookies, long[] extensions)
          Bulk renewal request of leases on Transactions.
 void setLookupGroups(String[] groups)
          Replace the list of groups to join with a new list.
 void setLookupLocators(LookupLocator[] locators)
          Replace the list of locators of specific lookup services to join with a new list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exporter

protected Exporter exporter
The exporter for exporting and unexporting


loginContext

protected LoginContext loginContext
The login context, for logging out

Method Detail

create

public TransactionManager.Created create(long lease)
                                  throws LeaseDeniedException
Description copied from interface: TransactionManager
Begin a new top-level transaction.

Specified by:
create in interface TransactionManager
Parameters:
lease - the requested lease time for the transaction
Returns:
the transaction ID and the lease granted
Throws:
LeaseDeniedException - if this manager is unwilling to grant the requested lease time

create

public TransactionManager.Created create(Object externalXid,
                                         long lease)
                                  throws LeaseDeniedException
Specified by:
create in interface ExtendedTransactionManager
Throws:
LeaseDeniedException

join

public void join(long id,
                 TransactionParticipant part,
                 long crashCount)
          throws UnknownTransactionException,
                 CannotJoinException,
                 CrashCountException,
                 RemoteException
Description copied from interface: TransactionManager
Join a transaction that is managed by this transaction manager. The crashCount marks the state of the storage used by the participant for transactions. If the participant attempts to join a transaction more than once, the crash counts must be the same. Each system crash or other event that destroys the state of the participant's unprepared transaction storage must cause the crash count to increase by at least one.

Specified by:
join in interface TransactionManager
Parameters:
id - the transaction ID
part - the participant joining the transaction
crashCount - the participant's current crash count
Throws:
UnknownTransactionException - if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.
CannotJoinException - if the transaction is known to the manager but is no longer active.
CrashCountException - if the crash count provided for the participant differs from the crash count in a previous invocation of the same pairing of participant and transaction
RemoteException - if there is a communication error
See Also:
ServerTransaction.join(net.jini.core.transaction.server.TransactionParticipant, long)

join

public void join(Object xid,
                 TransactionParticipant part,
                 long crashCount)
          throws UnknownTransactionException,
                 CannotJoinException,
                 CrashCountException,
                 RemoteException
Specified by:
join in interface ExtendedTransactionManager
Throws:
UnknownTransactionException
CannotJoinException
CrashCountException
RemoteException

join

public void join(long id,
                 TransactionParticipant part,
                 long crashCount,
                 int partitionId,
                 String clusterName)
          throws UnknownTransactionException,
                 CannotJoinException,
                 CrashCountException,
                 RemoteException
Specified by:
join in interface ExtendedTransactionManager
Throws:
UnknownTransactionException
CannotJoinException
CrashCountException
RemoteException

join

public void join(Object xid,
                 TransactionParticipant part,
                 long crashCount,
                 int partitionId,
                 String clusterName)
          throws UnknownTransactionException,
                 CannotJoinException,
                 CrashCountException,
                 RemoteException
Specified by:
join in interface ExtendedTransactionManager
Throws:
UnknownTransactionException
CannotJoinException
CrashCountException
RemoteException

join

public void join(long id,
                 TransactionParticipant part,
                 long crashCount,
                 ServerTransaction userXtnObject)
          throws UnknownTransactionException,
                 CannotJoinException,
                 CrashCountException,
                 RemoteException
Specified by:
join in interface ExtendedTransactionManager
Throws:
UnknownTransactionException
CannotJoinException
CrashCountException
RemoteException

join

public void join(Object xid,
                 TransactionParticipant part,
                 long crashCount,
                 ServerTransaction userXtnObject)
          throws UnknownTransactionException,
                 CannotJoinException,
                 CrashCountException,
                 RemoteException
Specified by:
join in interface ExtendedTransactionManager
Throws:
UnknownTransactionException
CannotJoinException
CrashCountException
RemoteException

join

public void join(long id,
                 TransactionParticipant part,
                 long crashCount,
                 ServerTransaction userXtnObject,
                 int partitionId,
                 String clusterName,
                 Object clusterProxy)
          throws UnknownTransactionException,
                 CannotJoinException,
                 CrashCountException,
                 RemoteException
Specified by:
join in interface ExtendedTransactionManager
Throws:
UnknownTransactionException
CannotJoinException
CrashCountException
RemoteException

join

public void join(Object xid,
                 TransactionParticipant part,
                 long crashCount,
                 ServerTransaction userXtnObject,
                 int partitionId,
                 String clusterName,
                 Object clusterProxy)
          throws UnknownTransactionException,
                 CannotJoinException,
                 CrashCountException,
                 RemoteException
Specified by:
join in interface ExtendedTransactionManager
Throws:
UnknownTransactionException
CannotJoinException
CrashCountException
RemoteException

disJoin

public boolean disJoin(long id,
                       TransactionParticipant part)
                throws UnknownTransactionException,
                       RemoteException
Description copied from interface: ExtendedTransactionManager
Remove a participant that was joined for a first time. called when a call to a participant returned empty so we can spare calling commit or abort on it, usually used in embedded mahalo

Specified by:
disJoin in interface ExtendedTransactionManager
Returns:
true if participant disjoined
Throws:
UnknownTransactionException
RemoteException
See Also:
TransactionParticipant

disJoin

public boolean disJoin(Object id,
                       TransactionParticipant part)
                throws UnknownTransactionException,
                       RemoteException
Throws:
UnknownTransactionException
RemoteException

prepare

public int prepare(Object xid)
            throws CannotCommitException,
                   UnknownTransactionException,
                   RemoteException
prepare the underlying xtn designated by the rendered xid

Specified by:
prepare in interface ExtendedTransactionManager
Parameters:
xid -
Returns:
Throws:
UnknownTransactionException
RemoteException
CannotCommitException

getState

public int getState(long id)
             throws UnknownTransactionException
Description copied from interface: TransactionManager
Returns the current state of the given transaction. The returned state can be any of the TransactionConstants values.

Specified by:
getState in interface TransactionManager
Parameters:
id - the transaction ID
Returns:
an int representing the state of the transaction
Throws:
UnknownTransactionException - if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.
See Also:
ServerTransaction.getState(), TransactionConstants

getState

public int getState(Object id)
             throws UnknownTransactionException
Specified by:
getState in interface ExtendedTransactionManager
Throws:
UnknownTransactionException

commit

public void commit(long id)
            throws UnknownTransactionException,
                   CannotCommitException,
                   RemoteException
Description copied from interface: TransactionManager
Commit the transaction. Commit asks the transaction manager to execute the voting process with the participants. Returns if the transaction successfully reaches either the NOTCHANGED or the COMMITTED state, without waiting for the transaction manager to notify all participants of the decision. If the transaction must be aborted (because one or more participants are unable to prepare), CannotCommitException is thrown without waiting for the transaction manager to notify all participants of the decision.

Specified by:
commit in interface TransactionManager
Parameters:
id - the transaction ID
Throws:
UnknownTransactionException - if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.
CannotCommitException - if the transaction is being or already has been aborted
RemoteException - if there is a communication error

commit

public void commit(long id,
                   long waitFor)
            throws UnknownTransactionException,
                   CannotCommitException,
                   TimeoutExpiredException,
                   RemoteException
Description copied from interface: TransactionManager
Commit the transaction, waiting for participants to be notified of the decision. Commit asks the transaction manager to execute the voting process with the participants. Returns if the transaction successfully reaches either the NOTCHANGED or the COMMITTED state, and the transaction manager has notified all participants of the decision, before the specified timeout expires. If the transaction must be aborted (because one or more participants are unable to prepare), CannotCommitException is thrown if the transaction manager is able to notify all participants of the decision before the specified timeout expires. If the transaction manager reaches a decision, but is unable to notify all participants of that decision before the specified timeout expires, then TimeoutExpiredException is thrown. If the specified timeout expires before the transaction manager reaches a decision, TimeoutExpiredException is not thrown until the manager reaches a decision.

Specified by:
commit in interface TransactionManager
Parameters:
id - the transaction ID
waitFor - timeout to wait, from the start of the call until all participants have been notified of the transaction manager's decision
Throws:
UnknownTransactionException - if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.
CannotCommitException - if the transaction is being or already has been aborted
TimeoutExpiredException - if the transaction manager reaches a decision, but is unable to notify all participants of that decision before the specified timeout expires
RemoteException - if there is a communication error

commit

public void commit(Object xid)
            throws UnknownTransactionException,
                   CannotCommitException,
                   RemoteException
Specified by:
commit in interface ExtendedTransactionManager
Throws:
UnknownTransactionException
CannotCommitException
RemoteException

commit

public void commit(Object xid,
                   long waitFor)
            throws UnknownTransactionException,
                   CannotCommitException,
                   TimeoutExpiredException,
                   RemoteException
Specified by:
commit in interface ExtendedTransactionManager
Throws:
UnknownTransactionException
CannotCommitException
TimeoutExpiredException
RemoteException

abort

public void abort(long id)
           throws UnknownTransactionException,
                  CannotAbortException
Description copied from interface: TransactionManager
Abort the transaction. This can be called at any time by any object holding a reference to the transaction. Abort asks the transaction manager to abort the transaction and to notify each participant of the decision, resulting in them rolling back any state changes made as part of the transaction. Returns as soon as the transaction manager records the abort decision, without waiting for the transaction manager to notify all participants of the decision.

Specified by:
abort in interface TransactionManager
Parameters:
id - the transaction ID
Throws:
UnknownTransactionException - if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.
CannotAbortException - if the transaction is known to have previously reached the COMMITTED state due to an earlier commit

abort

public void abort(long id,
                  long waitFor)
           throws UnknownTransactionException,
                  CannotAbortException,
                  TimeoutExpiredException
Description copied from interface: TransactionManager
Abort the transaction, waiting for participants to be notified of the decision. This can be called at any time by any object holding a reference to the transaction. Abort asks the transaction manager to abort the transaction and to notify each participant of the decision, resulting in them rolling back any state changes made as part of the transaction. Returns if the transaction manager records the decision and is able to notify all participants of the decision before the specified timeout expires. If the transaction manager is unable to notify all participants of the decision before the specified timeout expires, then TimeoutExpiredException is thrown.

Specified by:
abort in interface TransactionManager
Parameters:
id - the transaction ID
waitFor - timeout to wait, from the start of the call until all participants have been notified of the transaction manager's decision
Throws:
UnknownTransactionException - if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.
CannotAbortException - if the transaction is known to have previously reached the COMMITTED state due to an earlier commit
TimeoutExpiredException - if the timeout expires before all participants have been notified

abort_impl

public void abort_impl(Object id,
                       long waitFor)
                throws UnknownTransactionException,
                       CannotAbortException,
                       TimeoutExpiredException
Throws:
UnknownTransactionException
CannotAbortException
TimeoutExpiredException

abort

public void abort(Object xid)
           throws UnknownTransactionException,
                  CannotAbortException,
                  RemoteException
Specified by:
abort in interface ExtendedTransactionManager
Throws:
UnknownTransactionException
CannotAbortException
RemoteException

abort

public void abort(Object xid,
                  long waitFor)
           throws UnknownTransactionException,
                  CannotAbortException,
                  TimeoutExpiredException,
                  RemoteException
Specified by:
abort in interface ExtendedTransactionManager
Throws:
UnknownTransactionException
CannotAbortException
TimeoutExpiredException
RemoteException

recover

public void recover(long cookie,
                    LogRecord rec)
             throws 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 LogRecovery
Parameters:
cookie - the transaction's ID
rec - the LogRecord
Throws:
LogException

noteUnsettledTxn

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

Specified by:
noteUnsettledTxn in interface TxnSettler
Parameters:
tid - the transaction's ID

getTransaction

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

Specified by:
getTransaction in interface TxnManager
Parameters:
id - the ID
Throws:
UnknownTransactionException
See Also:
Transaction, TxnManager

renew

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

Specified by:
renew in interface Landlord
Specified by:
renew in interface LocalLandlord
Parameters:
cookie - identifies the leased resource
extension - requested lease extension
Returns:
The new duration the lease should have
Throws:
UnknownLeaseException - if landlord does not know about a lease with the specified cookie
LeaseDeniedException - if the landlord is unwilling to renew the lease
See Also:
Lease, LeasedResource, LeaseManager

cancel

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

Specified by:
cancel in interface Landlord
Specified by:
cancel in interface LocalLandlord
Specified by:
cancel in interface LeaseExpirationMgr.Expirer
Parameters:
cookie - identifies the leased resource
Throws:
UnknownLeaseException - if landlord does not know about a lease with the specified cookie
See Also:
Lease, LeasedResource, LeaseManager

renewAll

public Landlord.RenewResults renewAll(Uuid[] cookies,
                                      long[] extensions)
Bulk renewal request of leases on Transactions.

Specified by:
renewAll in interface Landlord
Parameters:
cookies - identifies the leased resources
extensions - requested lease extensions
Returns:
A RenewResults object that contains the new duration of each lease that was successfully renewed or the exception encountered for each lease that could not be renewed
See Also:
Lease, LeasedResource, LeaseManager

cancelAll

public Map cancelAll(Uuid[] cookies)
Bulk cancel of leases on Transactions.

Specified by:
cancelAll in interface Landlord
Parameters:
cookies - identifies the leased resources
Returns:
If all the leases specified in the cookies could be cancelled return null. Otherwise, return a Map that for each failed cancel attempt maps the corresponding cookie object to an exception describing the failure.
See Also:
Lease, LeasedResource, LeaseManager

manager

public TransactionManager manager()
Returns a reference to the TransactionManager interface.

Specified by:
manager in interface TxnManager
See Also:
TransactionManager

reenterPreparedExternalXid

public void reenterPreparedExternalXid(Object xid,
                                       List<TransactionParticipant> parts)
                                throws CannotCommitException
Description copied from interface: TxnManager
given a prepared xid (retrieved from participants) reenlist it and its participants- used in XA

Specified by:
reenterPreparedExternalXid in interface TxnManager
Throws:
CannotCommitException

destroy

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

Specified by:
destroy in interface DestroyAdmin

getAdmin

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

Specified by:
getAdmin in interface Administrable
Returns:
an object that implements whatever administration interfaces are appropriate for the particular service.
See Also:
JoinAdmin

getLookupAttributes

public Entry[] getLookupAttributes()
Description copied from interface: JoinAdmin
Get the current attribute sets for the service.

Specified by:
getLookupAttributes in interface JoinAdmin
Returns:
the current attribute sets for the service

addLookupAttributes

public void addLookupAttributes(Entry[] attrSets)
Description copied from interface: JoinAdmin
Add attribute sets for the service. The resulting set will be used for all future joins. The attribute sets are also added to all currently-joined lookup services.

Specified by:
addLookupAttributes in interface JoinAdmin
Parameters:
attrSets - the attribute sets to add

modifyLookupAttributes

public void modifyLookupAttributes(Entry[] attrSetTemplates,
                                   Entry[] attrSets)
Description copied from interface: JoinAdmin
Modify the current attribute sets, using the same semantics as ServiceRegistration.modifyAttributes. The resulting set will be used for all future joins. The same modifications are also made to all currently-joined lookup services.

Specified by:
modifyLookupAttributes in interface JoinAdmin
Parameters:
attrSetTemplates - the templates for matching attribute sets
attrSets - the modifications to make to matching sets
See Also:
ServiceRegistration.modifyAttributes(net.jini.core.entry.Entry[], net.jini.core.entry.Entry[])

getLookupGroups

public String[] getLookupGroups()
Description copied from interface: JoinAdmin
Get the list of groups to join. An empty array means the service joins no groups (as opposed to "all" groups).

Specified by:
getLookupGroups in interface JoinAdmin
Returns:
an array of groups to join. An empty array means the service joins no groups (as opposed to "all" groups).
See Also:
JoinAdmin.setLookupGroups(java.lang.String[])

addLookupGroups

public void addLookupGroups(String[] groups)
Description copied from interface: JoinAdmin
Add new groups to the set to join. Lookup services in the new groups will be discovered and joined.

Specified by:
addLookupGroups in interface JoinAdmin
Parameters:
groups - groups to join
See Also:
JoinAdmin.removeLookupGroups(java.lang.String[])

removeLookupGroups

public void removeLookupGroups(String[] groups)
Description copied from interface: JoinAdmin
Remove groups from the set to join. Leases are cancelled at lookup services that are not members of any of the remaining groups.

Specified by:
removeLookupGroups in interface JoinAdmin
Parameters:
groups - groups to leave
See Also:
JoinAdmin.addLookupGroups(java.lang.String[])

setLookupGroups

public void setLookupGroups(String[] groups)
Description copied from interface: JoinAdmin
Replace the list of groups to join with a new list. Leases are cancelled at lookup services that are not members of any of the new groups. Lookup services in the new groups will be discovered and joined.

Specified by:
setLookupGroups in interface JoinAdmin
Parameters:
groups - groups to join
See Also:
JoinAdmin.getLookupGroups()

getLookupLocators

public LookupLocator[] getLookupLocators()
Description copied from interface: JoinAdmin
Get the list of locators of specific lookup services to join.

Specified by:
getLookupLocators in interface JoinAdmin
Returns:
the list of locators of specific lookup services to join
See Also:
JoinAdmin.setLookupLocators(net.jini.core.discovery.LookupLocator[])

addLookupLocators

public void addLookupLocators(LookupLocator[] locators)
                       throws RemoteException
Description copied from interface: JoinAdmin
Add locators for specific new lookup services to join. The new lookup services will be discovered and joined.

Specified by:
addLookupLocators in interface JoinAdmin
Parameters:
locators - locators of specific lookup services to join
Throws:
RemoteException
See Also:
JoinAdmin.removeLookupLocators(net.jini.core.discovery.LookupLocator[])

removeLookupLocators

public void removeLookupLocators(LookupLocator[] locators)
                          throws RemoteException
Description copied from interface: JoinAdmin
Remove locators for specific lookup services from the set to join. Any leases held at the lookup services are cancelled.

Specified by:
removeLookupLocators in interface JoinAdmin
Parameters:
locators - locators of specific lookup services to leave
Throws:
RemoteException
See Also:
JoinAdmin.addLookupLocators(net.jini.core.discovery.LookupLocator[])

setLookupLocators

public void setLookupLocators(LookupLocator[] locators)
                       throws RemoteException
Description copied from interface: JoinAdmin
Replace the list of locators of specific lookup services to join with a new list. Leases are cancelled at lookup services that were in the old list but are not in the new list. Any new lookup services will be discovered and joined.

Specified by:
setLookupLocators in interface JoinAdmin
Parameters:
locators - locators of specific lookup services to join
Throws:
RemoteException
See Also:
JoinAdmin.getLookupLocators()

getProxy

public Object getProxy()
Description copied from interface: ProxyAccessor
Returns a proxy object for this remote object. If this remote object is not exported (and hence, no proxy is available), then null is returned.

Specified by:
getProxy in interface ProxyAccessor
Returns:
a proxy, or null

getLocalProxy

public TransactionManager getLocalProxy()
Specified by:
getLocalProxy in interface TxnManager

getServiceProxy

public Object getServiceProxy()
Description copied from interface: ServiceProxyAccessor
Returns a proxy object for this object. This value should not be null.

Specified by:
getServiceProxy in interface ServiceProxyAccessor
Returns:
a proxy object reference

initFailed

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

Parameters:
e - the exception produced by the failure
Throws:
Exception

getProxyVerifier

public TrustVerifier getProxyVerifier()
Description copied from interface: ServerProxyTrust
Returns a TrustVerifier that can be used to verify that a proxy can be trusted as a proxy for the service; that is, the isTrustedObject method of the returned verifier can be called with a candidate proxy. The verifier should be able to verify all proxies for the service, including proxies for resources (such as leases and registrations).

Specified by:
getProxyVerifier in interface ServerProxyTrust
Returns:
a TrustVerifier that can be used to verify that a proxy can be trusted as a proxy for the service

needParticipantsJoin

public boolean needParticipantsJoin()
                             throws RemoteException
returns true if this mgr which requires that the txn participants join into the txn in contrary to a mgr which the participants are known prior to txn propagation

Specified by:
needParticipantsJoin in interface TransactionManager
Returns:
true if its a mgr which requires that the txn participants to join
Throws:
RemoteException

getTransactionManagerId

public Uuid getTransactionManagerId()
                             throws RemoteException
Specified by:
getTransactionManagerId in interface TransactionManager
Throws:
RemoteException

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.