GigaSpaces XAP 9.0 API

com.j_spaces.core
Interface IJSpace

All Superinterfaces:
IPojoSpace, JavaSpace

public interface IJSpace
extends JavaSpace, IPojoSpace

Notice: Since 7.0 this API is internal and subject to changes in future versions - Use GigaSpace instead.

Since:
1.0
Version:
5.1
Author:
Igor Goldenberg
See Also:
GigaSpace

Field Summary
 
Fields inherited from interface net.jini.space.JavaSpace
NO_WAIT
 
Method Summary
 void clean()
          Deprecated. Since 8.0.2. The processing unit instance that contain this space instance should be restarted instead, or if the entire space was meant to be cleaned, the entire processing unit should be undeployed and redeployed. Using this method is strongly not recommended because it will not invoke any space mode change events registered components and it is not a cluster wide operation.
 void dropClass(String className)
          Drops all Class's entries and all its templates from the space.
 Object getAdmin()
          Returns the admin object to the remote part of this space.
 IJSpaceContainer getContainer()
          Deprecated. Since 8.0 - This method is reserved for internal usage.
 SpaceURL getFinderURL()
          Returns the SpaceURL object which was used as the argument for SpaceFinder.find(SpaceURL) while looking for the space.
 String getName()
          Returns the name of this space.
 int getReadModifiers()
          Gets the proxy ReadModifiers.
 Uuid getReferentUuid()
          Returns the unique Uuid of this space instance.
 com.j_spaces.core.IStubHandler getStubHandler()
          Deprecated. Since 8.0 - This method is reserved for internal usage.
 int getUpdateModifiers()
          Gets the proxyUpdateModifiers.
 SpaceURL getURL()
          Returns the SpaceURL instance which was used to initialize the space.
 boolean isEmbedded()
          Checks whether proxy is connected to embedded or remote space.
 boolean isFifo()
          Deprecated. 
 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 ping()
          Checks whether the space is alive and accessible.
 void setFifo(boolean enabled)
          Deprecated. 
 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.
 
Methods inherited from interface net.jini.space.JavaSpace
notify, read, readIfExists, snapshot, take, takeIfExists, write
 
Methods inherited from interface com.gigaspaces.client.IPojoSpace
clear, clear, count, count, read, read, readIfExists, readIfExists, readMultiple, readMultiple, snapshot, take, take, takeIfExists, takeMultiple, takeMultiple, update, update, updateMultiple, updateMultiple, write, write, writeMultiple, writeMultiple, writeMultiple
 

Method Detail

getName

String getName()
Returns the name of this space.


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)

getURL

SpaceURL getURL()
Returns the SpaceURL instance which was used to initialize the space.


getReferentUuid

Uuid getReferentUuid()
Returns the unique Uuid of this space instance.


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

isEmbedded

boolean isEmbedded()
Checks whether proxy is connected to embedded or remote space.


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

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

getReadModifiers

int getReadModifiers()
Gets the proxy ReadModifiers.


setReadModifiers

int setReadModifiers(int readModifiers)
Sets the read mode modifiers for proxy level.


getUpdateModifiers

int getUpdateModifiers()
Gets the proxyUpdateModifiers.


setUpdateModifiers

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


isOptimisticLockingEnabled

boolean isOptimisticLockingEnabled()
Returns status of Optimistic Lock protocol.


setOptimisticLocking

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


isFifo

@Deprecated
boolean isFifo()
Deprecated. 

Returns true if this proxy FIFO enabled, otherwise false.


setFifo

@Deprecated
void setFifo(boolean enabled)
Deprecated. 

Sets FIFO mode for proxy.


isNOWriteLeaseMode

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

Checks the write mode.


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

getAdmin

Object getAdmin()
                throws RemoteException
Returns the admin object to the remote part of this space.

 // get a list of classes and the number of entries of each class
 IRemoteJSpaceAdmin remoteAdmin = (IRemoteJSpaceAdmin)serverAdmin.getAdmin();
 Object classList[] = remoteAdmin.getRuntimeInfo().m_ClassNames.toArray();
 List numOFEntries = remoteAdmin.getRuntimeInfo().m_NumOFEntries;
 

Returns:
the remoteAdmin object to the remote part of this space.
Throws:
RemoteException - if a communication error occurs

getContainer

@Deprecated
IJSpaceContainer getContainer()
Deprecated. Since 8.0 - This method is reserved for internal usage.

Returns the container proxy this space resides in.
The container holds information and attributes of neighboring spaces, and exposes API for creating and destroying of spaces.

Returns:
Returns the container proxy.

getStubHandler

@Deprecated
com.j_spaces.core.IStubHandler getStubHandler()
Deprecated. Since 8.0 - This method is reserved for internal usage.

Returns the StubHandler of this space.

Returns:
StubHandler of this space.

ping

void ping()
          throws RemoteException
Checks whether the space is alive and accessible.

Throws:
RemoteException - when space was unreachable

clean

@Deprecated
void clean()
           throws RemoteException
Deprecated. Since 8.0.2. The processing unit instance that contain this space instance should be restarted instead, or if the entire space was meant to be cleaned, the entire processing unit should be undeployed and redeployed. Using this method is strongly not recommended because it will not invoke any space mode change events registered components and it is not a cluster wide operation.

Cleans this space. The side-effects of cleaning the space are:

 serverAdmin.clean();
 

Throws:
RemoteException - if a communication error occurs

dropClass

void dropClass(String className)
               throws RemoteException,
                      DropClassException
Drops all Class's entries and all its templates from the space. Calling this method will remove all internal meta data related to this class stored in the space. When using persistent spaced the relevant RDBMS table will be dropped. It is the caller responsibility to ensure that no entries from this class are written to the space while this method is called.

 Message message = new Message("Hello");
 Lease lease = space.write(message, null, Lease.FOREVER);

 serverAdmin.dropClass( Message.class.getName());
 

Parameters:
className - name of class to delete.
Throws:
DropClassException - Failed to drop desired class.
RemoteException - if a communication error occurs
See Also:
IPojoSpace.clear(Object, Transaction)

GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.