GigaSpaces XAP 8.0 API

com.gigaspaces.client
Interface IProxyAdmin

All Known Subinterfaces:
IJSpace

public interface IProxyAdmin

This interface contains all the administrative methods that the proxy provides to control the proxy.


 Usage:
        IPojoSpace space = (IPojoSpace)SpaceFinder.find(spaceUrl);
        IProxyAdmin proxyAdmin = space.getProxyAdmin();
 
 The code examples on each method assumes the above usage.
 

Since:
6.1
Author:
Guy Korland
See Also:
IPojoSpace.getProxyAdmin(), IRemoteJSpaceAdmin

Method Summary
 SpaceURL getFinderURL()
          Returns the SpaceURL object which was used as the argument for SpaceFinder.find(SpaceURL) while looking for the space.
 int getReadModifiers()
          Gets the proxy ReadModifiers.
 int getUpdateModifiers()
          Gets the proxyUpdateModifiers.
 boolean isFifo()
          Deprecated. Use getReadModifiers() with ReadModifiers.FIFO instead.
 boolean isNOWriteLeaseMode()
          Deprecated. Since 8.0 - Use UpdateModifiers.NO_RETURN_VALUE instead.
 boolean isOptimisticLockingEnabled()
          Returns status of Optimistic Lock protocol.
 boolean isSecured()
          Returns an indication : is this space secured.
 boolean isStartedWithinGSC()
          Deprecated. Since 8.0 - This method is reserved for internal usage.
 void setDefaultTransaction(Transaction transaction)
          Deprecated. Since 8.0 - Use GigaSpace transactions instead.
 void setFifo(boolean enabled)
          Deprecated. Use setReadModifiers() with ReadModifiers.FIFO instead.
 void setNOWriteLeaseMode(boolean noWriteLeaseMode)
          Deprecated. Since 8.0 - Use UpdateModifiers.NO_RETURN_VALUE instead.
 void setOptimisticLocking(boolean enabled)
          Enable/Disable Optimistic Lock protocol.
 int setReadModifiers(int readModifiers)
          Sets the read mode modifiers for proxy level.
 void setSecurityContext(com.j_spaces.core.SecurityContext context)
          Deprecated. since 7.0.1
 int setUpdateModifiers(int newModifiers)
          Sets the update mode modifiers for proxy level.
 

Method Detail

setSecurityContext

@Deprecated
void setSecurityContext(com.j_spaces.core.SecurityContext context)
                        throws SecurityException,
                               RemoteException
Deprecated. since 7.0.1

Sets the SecurityContext which holds the username and password for authentication. This method is deprecated as of 7.0.1, and security credentials should be passed using the GigaSpace configurer constructs.

Parameters:
context - the SecurityContext to be used for authentication against a secured space.
Throws:
SecurityException - if authentication failed for any reason.
RemoteException - if a communication error occurs

isSecured

boolean isSecured()
Returns an indication : is this space secured. If for this space defined Security Filter, the space will be secured.

Returns:
boolean true if this space secured, otherwise false.
See Also:
DefaultSecurityFilter

isStartedWithinGSC

@Deprecated
boolean isStartedWithinGSC()
                           throws RemoteException
Deprecated. Since 8.0 - This method is reserved for internal usage.

Returns true if the space started within a GSC.

Throws:
RemoteException

setOptimisticLocking

void setOptimisticLocking(boolean enabled)
Enable/Disable Optimistic Lock protocol.

Parameters:
enabled - true enable Optimistic Lock protocol, false disable.
See Also:
SpaceVersion

isOptimisticLockingEnabled

boolean isOptimisticLockingEnabled()
Returns status of Optimistic Lock protocol.

Returns:
true Optimistic Lock enabled, otherwise false.
See Also:
SpaceVersion

setFifo

@Deprecated
void setFifo(boolean enabled)
Deprecated. Use setReadModifiers() with ReadModifiers.FIFO instead.

Sets FIFO mode for proxy. Every operation performed through the proxy will use FIFO ordering.

Parameters:
enabled - if true this proxy FIFO enabled, otherwise false.
See Also:
SpaceClass.fifoSupport()

isFifo

@Deprecated
boolean isFifo()
Deprecated. Use getReadModifiers() with ReadModifiers.FIFO instead.

Returns true if this proxy FIFO enabled, otherwise false.

Returns:
Returns true if this proxy FIFO enabled, otherwise false.
See Also:
SpaceClass.fifoSupport()

setNOWriteLeaseMode

@Deprecated
void setNOWriteLeaseMode(boolean noWriteLeaseMode)
Deprecated. Since 8.0 - Use UpdateModifiers.NO_RETURN_VALUE instead.

If set to true, Lease object will not return from write/writeMultiple operations.
The other way to set noWriteLease mode enabled using SpaceFinder:
SpaceFinder.find("jini://localhost/myContainer/mySpace?noWriteLease")

Parameters:
noWriteLeaseMode - write mode.
See Also:
SpaceURL

isNOWriteLeaseMode

@Deprecated
boolean isNOWriteLeaseMode()
Deprecated. Since 8.0 - Use UpdateModifiers.NO_RETURN_VALUE instead.

Checks the write mode.

Returns:
true if do not return Lease object after write, otherwise false.
See Also:
setNOWriteLeaseMode(boolean)

getFinderURL

SpaceURL getFinderURL()
Returns the SpaceURL object which was used as the argument for SpaceFinder.find(SpaceURL) while looking for the space. If a client uses this SpaceURL when it calls to SpaceFinder.find(SpaceURL) it should be able to find that space. Notice: The SpaceURL returned when calling getURL() is different since in that case it returns the SpaceURL used to initialize the space (a java:// protocol to start an embedded space).

Returns:
SpaceURL object which can be used to find the space proxy while calling SpaceFinder.find(SpaceURL)

setUpdateModifiers

int setUpdateModifiers(int newModifiers)
Sets the update mode modifiers for proxy level.

Parameters:
newModifiers - new values for modifiers Values are defined in UpdateModifiers.
Returns:
old value of modifiers.
See Also:
IPojoSpace.update(Object, Transaction, long, long, int), IPojoSpace.update(Object, Transaction, long, long, int)

getUpdateModifiers

int getUpdateModifiers()
Gets the proxyUpdateModifiers. Values are defined in UpdateModifiers class.
Default value: UPDATE_ONLY.

Returns:
value of modifiers.
See Also:
IPojoSpace.update(Object, Transaction, long, long, int), IPojoSpace.update(Object, Transaction, long, long, int)

setReadModifiers

int setReadModifiers(int readModifiers)
Sets the read mode modifiers for proxy level.
Default: ReadModifiers.REPEATABLE_READ

Parameters:
readModifiers - new values for modifiers Values are defined in ReadModifiers.
Returns:
old value of modifiers.
Since:
6.0
See Also:
ReadModifiers, IPojoSpace.read(Object, Transaction, long, int), IJSpace.readIfExists(net.jini.core.entry.Entry, Transaction, long, int)

getReadModifiers

int getReadModifiers()
Gets the proxy ReadModifiers.
values are from ReadModifiers.

Returns:
value of modifiers.
Since:
6.0
See Also:
IPojoSpace.read(Object, Transaction, long, int), IJSpace.readIfExists(net.jini.core.entry.Entry, Transaction, long, int)

setDefaultTransaction

@Deprecated
void setDefaultTransaction(Transaction transaction)
Deprecated. Since 8.0 - Use GigaSpace transactions instead.

Sets default transaction to use in case that null parameter is used as transaction parameter with JavaSpace methods.
Notice: after commit/abort the default transaction should be set to null otherwise the TransactionException will be thrown on the next space operation call.

 proxyAdmin.setDefaultTransaction( txn);

 space.write( entry1, null, Lease.FOREVER );
 space.write( entry2, null, Lease.FOREVER );
 txn.commit();

 proxyAdmin.setDefaultTransaction( null);
 

Note: This function is unsupported when using it in conjunction with local cache.

Parameters:
transaction - the default transaction.

GigaSpaces XAP 8.0 API

Copyright © GigaSpaces.