public interface Space
Tuple
.
A Space has the following attributes:
Metaspace
and should conform to the following rules:
SpaceDef
. The ActiveSpaces Administrative tool can also be used to create and define the characteristics
of a Space.
Member
of the Space.
Before joining a space, the application defines the characteristics of its membership in the Space using SpaceMemberDef
.
An ActiveSpaces application should always define its membership role when joining a Space.
Member.DistributionRole.SEEDER
: The Member is willing to store (seed) entries put into the Space by any Member.e
Member.DistributionRole.LEECH
: The Member is not willing to store any entries put into the Space by any Member.
SpaceDef
, how entries are
distributed for storage amongst the seeders of a space can be controlled.
SpaceDef.DistributionPolicy.DISTRIBUTED
: Storage of entries is distributed amongst all seeding Members.
AS-Agents will automatically join the Space as seeding Members.
SpaceDef.DistributionPolicy.NON_DISTRIBUTED
: Only one of the seeding Members stores all of the entries.
AS-Agents will not automatically join the Space.
Tuple
storage and retrieval:
SpaceDef
.
com.tibco.as.space.listener
contains several interfaces which can
be implemented by an ActiveSpaces application to have their callbacks invoked when events such as
a put, take or expire occur in a Space.
BrowserDef
.
The entries retrieved from Browsers can be continuously updated according to changes in the Space
(i.e. they are always coherent with the space unless the Browser's time scope is SNAPSHOT).
Operations such as get, take and lock can be invoked on the entries being
browsed according to the type of the Browser (TAKE and LOCK browsers are always consistent with the space
being browsed).
EventBrowserDef
. How an Event Browser behaves is similar to how
a Space Browser behaves except that the Event Browser returns the events occuring in a Space and
the data associated with the event, if any.
SpaceDef
,
Tuple
,
Member
,
SpaceMemberDef
,
Metaspace
,
BrowserDef
,
Browser
Modifier and Type | Method and Description |
---|---|
Browser |
browse(BrowserDef.BrowserType browserType)
Creates a Browser object which can be used to perform operations on multiple entries in a Space.
|
Browser |
browse(BrowserDef.BrowserType browserType,
BrowserDef browserDef)
Creates a Browser object which can be used to perform operations on multiple entries in a Space.
|
Browser |
browse(BrowserDef.BrowserType browserType,
BrowserDef browserDef,
java.lang.String filter)
Creates a Browser object which can be used to perform operations on multiple entries in a Space which
match the specified filter.
|
EventBrowser |
browseEvents(EventBrowserDef eventBrowserDef)
Creates an EventBrowser object which can be used to retrieve and iterate over events that occur
in a Space.
|
EventBrowser |
browseEvents(EventBrowserDef eventBrowserDef,
java.lang.String filter)
Creates an EventBrowser object which can be used to retrieve and iterate over the events that
occur in a Space and that match the specified filter.
|
void |
clear()
Deletes all tuples in the Space.
|
void |
clear(java.lang.String filter)
Deletes from the Space the tuples that match the specified filter on a "best effort" basis.
|
void |
close()
Invalidates this Space reference with the distribution role it initialized with.
|
void |
closeAll()
Forcefully leaves the Space and stops and invalidates any existing listeners and browsers
created on the Space.
|
Tuple |
compareAndPut(Tuple oldTuple,
Tuple newTuple)
Used to replace an the values of an existing entry with new values as long as the existing entry has not been
modified and still matches the values in
oldTuple . |
Tuple |
compareAndPut(Tuple oldTuple,
Tuple newTuple,
PutOptions putOptions)
Same as
compareAndPut(com.tibco.as.space.Tuple, com.tibco.as.space.Tuple) with PutOptions
to specify custom lock wait, lock/unlock options. |
SpaceResultList |
compareAndPutAll(java.util.Collection<Tuple> oldTuples,
java.util.Collection<Tuple> newTuples)
Batch compareAndPut operation.
|
SpaceResultList |
compareAndPutAll(java.util.Collection<Tuple> oldTuples,
java.util.Collection<Tuple> newTuples,
java.util.Collection<PutOptions> optionsCollection)
Batch compareAndPut operation with a collection of PutOptions
|
SpaceResultList |
compareAndPutAll(java.util.Collection<Tuple> oldTuples,
java.util.Collection<Tuple> newTuples,
PutOptions putOptions)
Batch compareAndPut operation with PutOptions.
|
Tuple |
compareAndTake(Tuple oldTuple)
Removes the entry from the Space which matches the Tuple passed into the method.
|
Tuple |
compareAndTake(Tuple oldTuple,
TakeOptions takeOptions)
Removes the entry from the Space which matches the Tuple passed into the method.
|
SpaceResultList |
compareAndTakeAll(java.util.Collection<Tuple> oldTuples)
Batch compareAndTake operation.
|
SpaceResultList |
compareAndTakeAll(java.util.Collection<Tuple> oldTuples,
TakeOptions takeOptions)
Batch compareAndTake operation with TakeOptions.
|
java.lang.String |
explainQuery(java.lang.String filter)
Returns A string that describes the cost of the query execution in each seeder
|
Tuple |
get(Tuple tuple)
Retrieve the entry stored in the Space with the key specified in the given Tuple.
|
Tuple |
get(Tuple tuple,
GetOptions options) |
SpaceResultList |
getAll(java.util.Collection<Tuple> tuples)
Batch get operation.
|
java.util.Collection<Member> |
getLeeches()
Returns the collection of @Member of the space with leech role
|
java.util.Collection<Member> |
getMembers()
Returns the collection of @Member of the space
|
Metaspace |
getMetaspace()
Retrieve the Metaspace object the Space belongs to.
|
java.lang.String |
getMetaspaceName()
Retrieve the name of the Metaspace that the Space belongs to.
|
java.lang.String |
getName()
Returns the name of the Space.
|
java.util.Collection<Member> |
getRemoteMembers()
Returns the collection of @Member of the space connected using remote client
|
java.util.Collection<Member> |
getSeeders()
Returns the collection of @Member of the space with seeder role
|
SpaceDef |
getSpaceDef()
Retrieve the attributes used to create the Space.
|
SpaceDef.SpaceState |
getSpaceState()
Retrieve the state of the Space.
|
InvokeResult |
invoke(Tuple keyTuple,
java.lang.Class<? extends Invocable> cls,
Tuple contextTuple)
Deprecated.
|
InvokeResult |
invoke(Tuple tuple,
InvokeOptions options)
Deprecated.
|
InvokeResult |
invoke(Tuple tuple,
java.lang.String invocable,
InvokeOptions options)
Causes execution of the
invoke method from the specified class on the Member of the Space
where the entry associated with the key specified in tuple is stored. |
InvokeResult |
invoke(Tuple keyTuple,
java.lang.String invocable,
Tuple contextTuple)
Deprecated.
|
InvokeResultList |
invokeLeeches(InvokeOptions invokeOptions)
Deprecated.
|
InvokeResultList |
invokeLeeches(java.lang.String invocable,
InvokeOptions invokeOptions)
Invokes in parallel the appropriate
invoke method of the specified class on all of the
members of the Space which have a distribution role of leech. |
InvokeResult |
invokeMember(Member member,
java.lang.Class<? extends MemberInvocable> cls,
Tuple contextTuple)
Deprecated.
|
InvokeResult |
invokeMember(Member member,
InvokeOptions options)
Deprecated.
|
InvokeResult |
invokeMember(Member member,
java.lang.String invocable,
InvokeOptions options)
Causes execution of the
invoke method of the specified class on the specific Member of
the Space passed as an argument. |
InvokeResult |
invokeMember(Member member,
java.lang.String invocable,
Tuple contextTuple)
Deprecated.
|
InvokeResultList |
invokeMembers(java.lang.Class<? extends MemberInvocable> cls,
Tuple contextTuple)
Deprecated.
|
InvokeResultList |
invokeMembers(java.util.Collection<Member> members,
java.lang.Class<? extends MemberInvocable> cls,
Tuple contextTuple)
Deprecated.
|
InvokeResultList |
invokeMembers(java.util.Collection<Member> members,
InvokeOptions options)
Deprecated.
|
InvokeResultList |
invokeMembers(java.util.Collection<Member> members,
java.lang.String invocable,
InvokeOptions options) |
InvokeResultList |
invokeMembers(java.util.Collection<Member> members,
java.lang.String invocable,
Tuple contextTuple)
Deprecated.
|
InvokeResultList |
invokeMembers(InvokeOptions invokeOptions)
Deprecated.
|
InvokeResultList |
invokeMembers(java.lang.String invocable,
InvokeOptions invokeOptions)
Invokes in parallel the appropriate
invoke method of the specified class on all of the
members of the Space. |
InvokeResultList |
invokeMembers(java.lang.String invocable,
Tuple contextTuple)
Deprecated.
|
InvokeResultList |
invokeRemoteMembers(InvokeOptions invokeOptions)
Deprecated.
|
InvokeResultList |
invokeRemoteMembers(java.lang.String invocable,
InvokeOptions invokeOptions)
Invokes in parallel the appropriate
invoke method of the specified class on all of the
remote members of the Space. |
InvokeResultList |
invokeSeeders(java.lang.Class<? extends MemberInvocable> cls,
Tuple contextTuple)
Deprecated.
|
InvokeResultList |
invokeSeeders(InvokeOptions invokeOptions)
Deprecated.
|
InvokeResultList |
invokeSeeders(java.lang.String invocable,
InvokeOptions invokeOptions)
Invokes in parallel the appropriate
invoke method of the specified class on all of the
members of the Space which have a distribution role of seeder. |
InvokeResultList |
invokeSeeders(java.lang.String cls,
Tuple contextTuple)
Deprecated.
|
boolean |
isReady()
Check whether the Space is ready for operations.
|
boolean |
isValid()
Deprecated.
|
void |
leave()
Deprecated.
This method is deprecated and calls
close() |
Listener |
listen(Listener listener)
Attaches a Listener object to a Space for receiving event notifications.
|
Listener |
listen(Listener listener,
ListenerDef listenerDef)
Attaches a Listener object to a Space for receiving event notifications.
|
Listener |
listen(Listener listener,
ListenerDef listenerDef,
java.lang.String filter)
Attaches a Listener object to a Space for receiving event notifications that match the specified filter.
|
Listener |
listen(Listener listener,
java.lang.String filter)
Attaches a Listener object to a Space for receiving event notifications that match the specified filter.
|
void |
load(Tuple tuple)
This function is typically used in an implementation of the
Persister.onLoad(com.tibco.as.space.persistence.LoadAction)
function to load the space. |
SpaceResultList |
loadAll(java.util.Collection<Tuple> tuples)
Batch load operation.
|
Tuple |
lock(Tuple tuple)
Locks the entry stored in the Space which has the key specified in the given Tuple.
|
Tuple |
lock(Tuple tuple,
LockOptions lockOptions)
Locks the entry stored in the Space which has the key specified in the given Tuple.
|
SpaceResultList |
lockAll(java.util.Collection<Tuple> tuples)
Batch lock operation.
|
SpaceResultList |
lockAll(java.util.Collection<Tuple> tuples,
LockOptions lockOptions)
Batch lock operation with LockOptions.
|
java.lang.Object |
max(java.lang.String fieldName) |
java.lang.Object |
min(java.lang.String fieldName) |
Tuple |
put(Tuple tuple)
Stores a Tuple into the Space and returns any entry already stored in the Space with the same key.
|
Tuple |
put(Tuple tuple,
PutOptions putOptions)
Stores a Tuple into the Space and returns any entry already stored in the Space with the same key.
|
SpaceResultList |
putAll(java.util.Collection<Tuple> tuples)
Batch put operation.
|
SpaceResultList |
putAll(java.util.Collection<Tuple> tuples,
java.util.Collection<PutOptions> optionsCollection)
Batch put operation with collection of PutOptions.
|
SpaceResultList |
putAll(java.util.Collection<Tuple> tuples,
PutOptions putOptions)
Batch put operation with PutOptions.
|
void |
resetStats()
Reset the statistics of all Space Members of the Space.
|
void |
setDistributionRole(Member.DistributionRole distributionRole)
Sets the distribution role of the calling Member of the Space.
|
Persister |
setPersister(Persister persister)
Registers the given Persister object as a persister for the Space.
|
Router |
setRouter(Router router)
Registers the given Router object as a router for the Space.
|
long |
size()
Retrieves the number of entries stored in the Space.
|
long |
size(java.lang.String filter)
Returns number of entries stored in the Space which match the given filter.
|
void |
stopListener(Listener listener)
Stops the specified Listener object, that was previously attached to the Space, and its associated
thread.
|
void |
stopPersister(Persister persister)
Stops the given Persister object, that was previously registered, and its associated thread.
|
void |
stopRouter(Router router)
Stops the given Router object, that was previously registered, and its associated thread.
|
Tuple |
take(Tuple tuple)
Returns and atomically removes from the Space the entry (if one exists) whose
key field matches the key field of the Tuple provided.
|
Tuple |
take(Tuple tuple,
TakeOptions takeOptions)
Returns and atomically removes from the Space the entry (if one exists) whose
key field matches the key field of the Tuple provided.
|
SpaceResultList |
takeAll(java.util.Collection<Tuple> tuples)
Batch take operation.
|
SpaceResultList |
takeAll(java.util.Collection<Tuple> tuples,
TakeOptions takeOptions)
Batch take operation with TakeOptions.
|
void |
unlock(Tuple tuple)
Unlocks the entry stored in the Space which has the key specified in the given Tuple.
|
void |
unlock(Tuple tuple,
UnlockOptions unlockOptions)
Unlocks the entry stored in the Space which has the key specified in the given Tuple.
|
SpaceResultList |
unlockAll(java.util.Collection<Tuple> tuples)
Batch unlock operation.
|
SpaceResultList |
unlockAll(java.util.Collection<Tuple> tuples,
UnlockOptions unlockOptions)
Batch unlock operation with UnlockOptions.
|
void |
waitForReady()
Causes the client code to block until the Space is ready for operations.
|
boolean |
waitForReady(long timeout)
Causes the client code to block until the Space is ready for operations or the specified timeout is reached.
|
Metaspace getMetaspace() throws ASException
ASException
java.lang.String getMetaspaceName()
void leave() throws ASException
close()
ASException
- An exception if leave failsvoid close() throws ASException
ASException
- An exception if close failsvoid closeAll() throws ASException
ASException
- An exception if close all failsTuple get(Tuple tuple) throws ASException
tuple
- Tuple containing the key to search for.ASException
- An exception is thrown if an error occurs while retrieving the Tuple values.Tuple get(Tuple tuple, GetOptions options) throws ASException
ASException
Tuple put(Tuple tuple) throws ASException
tuple
- Tuple to be stored into the Space.ASException
- An exception is thrown if an error occurs while storing the Tuple values into the Space.Tuple put(Tuple tuple, PutOptions putOptions) throws ASException
tuple
- A Tuple containing values to be stored into the Space.putOptions
- Specifies custom lock wait/lock/unlock/forget options.ASException
- An exception is thrown if an error occurs while storing the Tuple values into the Space.void load(Tuple tuple) throws ASException
Persister.onLoad(com.tibco.as.space.persistence.LoadAction)
function to load the space.
The load function is the only one that can be invoked on a space that is in the SpaceDef.SpaceState.LOADING
phase.
Load behaves exactly as a put, except that it does not trigger Persister.onWrite(com.tibco.as.space.persistence.WriteAction)
method. put(com.tibco.as.space.Tuple)
method should not be called to load entries from a Database into a Space.tuple
- A Tuple containing values to be stored into the Space.ASException
- An exception is thrown if an error occurs while storing the Tuple values into the Space.Tuple take(Tuple tuple) throws ASException
tuple
- A Tuple containing a key field to search for in the Space.ASException
- An exception is thrown if an error occurs while removing the Tuple values from the Space.Tuple take(Tuple tuple, TakeOptions takeOptions) throws ASException
tuple
- Tuple containing a key field to search for in the Space.takeOptions
- Specifies custom lock wait/lock/unlock/forget options.ASException
- An exception is thrown if an error occurs while removing the Tuple values from the Space.Tuple compareAndPut(Tuple oldTuple, Tuple newTuple) throws ASException
oldTuple
. If the existing entry has been modified and
doesn't match oldTuple
, the values of the modified entry are returned so there is no need to do
another get to retrieve the modified values.
If the operation is successful, the Tuple returned will be same as newTuple
. Otherwise,
the Tuple returned will contain the values from the entry stored in the Space.
Example:
Tuple result = space.compareAndPut(oldTuple, newTuple); if (result == newTuple) // operation is successful else // operation failed due to mismatch
oldTuple
- Tuple to use for comparison with the entry in the Space. A null value in oldTuple
indicates the user wants the operation to be successful if the entry in the Space
doesn't already have a value.newTuple
- A Tuple containing the new values to store in the existing entry.newTuple
on success, otherwise a Tuple containing the current values from the entry.ASException
- An exception is thrown if an error occurs while storing the Tuple values into the Space.Tuple compareAndPut(Tuple oldTuple, Tuple newTuple, PutOptions putOptions) throws ASException
compareAndPut(com.tibco.as.space.Tuple, com.tibco.as.space.Tuple)
with PutOptions
to specify custom lock wait, lock/unlock options.oldTuple
- Tuple to use for comparison with the entry in the Space. A null value in oldTuple
indicates the user wants the operation to be successful if the Tuple in the Space
doesn't already have a value.newTuple
- A Tuple containing the new values to store in the existing entry.putOptions
- Specified custom lock wait/lock/unlock options. The forget option is ignored since
on a mismatch ActiveSpaces needs to return the existing entry's values.newTuple
on success, otherwise a Tuple containing the current values from the entry.ASException
- An exception is thrown if an error occurs while storing the Tuple values into the Space.Tuple compareAndTake(Tuple oldTuple) throws ASException
oldTuple
- Tuple to use for comparing against the entries stored in the Space.oldTuple
is returned. On failure,
a Tuple with the same values as the entry in the Space is returned.ASException
- An exception is thrown if an error occurs while removing the entry from the Space.Tuple compareAndTake(Tuple oldTuple, TakeOptions takeOptions) throws ASException
oldTuple
- Tuple to use for comparing against the entries stored in the Space.takeOptions
- Specifies custom lock wait/lock/unlock options. The forget option is ignored since
on a mismatch ActiveSpaces needs to return the existing entry's values.oldTuple
is returned. On failure,
a Tuple with the same values as the entry in the Space is returned.ASException
- An exception is thrown if an error occurs while removing the entry from the Space.Tuple lock(Tuple tuple) throws ASException
tuple
- Tuple containing the key of the entry to lock.ASException
- An exception is thrown if the entry cannot be locked.Tuple lock(Tuple tuple, LockOptions lockOptions) throws ASException
tuple
- Tuple containing the key of the entry to lock.lockOptions
- Used to specify the following:
SpaceDef.getLockWait()
)
ASException
- An exception is thrown if the entry cannot be locked.void unlock(Tuple tuple) throws ASException
tuple
- Tuple containing the key of the entry to unlock.ASException
- An exception is thrown if the entry cannot be unlocked.void unlock(Tuple tuple, UnlockOptions unlockOptions) throws ASException
tuple
- Tuple containing the key of the entry to unlock.unlockOptions
- Used to specify the following:
SpaceDef.getLockWait()
)
ASException
- An exception is thrown if the entry cannot be unlocked.SpaceResultList getAll(java.util.Collection<Tuple> tuples)
tuples
- A Collection of Tuples which contain the keys to use for searching for the entries in
the Space to retrieve.SpaceResultList putAll(java.util.Collection<Tuple> tuples)
tuples
- A Collection of Tuples to be stored in the Space.SpaceResultList putAll(java.util.Collection<Tuple> tuples, PutOptions putOptions)
tuples
- A Collection of Tuples to be stored in the Space.putOptions
- Specifies custom lock wait/lock/unlock options.SpaceResultList putAll(java.util.Collection<Tuple> tuples, java.util.Collection<PutOptions> optionsCollection)
tuples
- A Collection of Tuples to be stored in the Space.optionsCollection
- Specifies collection of PutOptions per tupleSpaceResultList loadAll(java.util.Collection<Tuple> tuples)
tuples
- A Collection of Tuples to be loaded into the Space.SpaceResultList takeAll(java.util.Collection<Tuple> tuples)
tuples
- A Collection of Tuples which contain the keys to use for searching for the entries
to remove from the Space.SpaceResultList takeAll(java.util.Collection<Tuple> tuples, TakeOptions takeOptions)
tuples
- A Collection of Tuples which contain the keys to use for searching for the entries
to remove from the Space.takeOptions
- Specifies custom lock wait/lock/unlock options.SpaceResultList compareAndPutAll(java.util.Collection<Tuple> oldTuples, java.util.Collection<Tuple> newTuples)
oldTuples
- A Collection of Tuples to use for comparison with the existing entries in the Space.newTuples
- A Collection of Tuples containing new values to store in the existing entries.SpaceResultList compareAndPutAll(java.util.Collection<Tuple> oldTuples, java.util.Collection<Tuple> newTuples, PutOptions putOptions)
oldTuples
- A Collection of Tuples to use for comparison with the existing entries in the Space.newTuples
- A Collection of Tuples containing new values to store in the existing entries.putOptions
- Specifies custom lock wait/lock/unlock options.SpaceResultList compareAndPutAll(java.util.Collection<Tuple> oldTuples, java.util.Collection<Tuple> newTuples, java.util.Collection<PutOptions> optionsCollection)
oldTuples
- A Collection of Tuples to use for comparison with the existing entries in the Space.newTuples
- A Collection of Tuples containing new values to store in the existing entries.optionsCollection
- Specifies collection of PutOptions per tupleSpaceResultList compareAndTakeAll(java.util.Collection<Tuple> oldTuples)
oldTuples
- A Collection of Tuples to use for comparing against the entries stored in the Space.oldTuple
.
For each failure, SpaceResult will contain a Tuple with the same values as the entry
in the Space. Use SpaceResult.getTuple()
to retrieve the resulting Tuples.SpaceResultList compareAndTakeAll(java.util.Collection<Tuple> oldTuples, TakeOptions takeOptions)
oldTuples
- A Collection of Tuples to use for comparing against the entries stored in the Space.takeOptions
- Specifies custom lock wait/lock/unlock options.oldTuple
.
For each failure, SpaceResult will contain a Tuple with the same values as the entry
in the Space. Use SpaceResult.getTuple()
to retrieve the resulting Tuples.SpaceResultList lockAll(java.util.Collection<Tuple> tuples)
tuples
- A Collection of Tuples which contain the keys to use for searching for the entries
to lock in the Space.SpaceResultList lockAll(java.util.Collection<Tuple> tuples, LockOptions lockOptions)
tuples
- A Collection of Tuples which contain the keys to use for searching for the entries
to lock in the Space.lockOptions
- Specifies custom lock wait/forget/lock scope options.SpaceResultList unlockAll(java.util.Collection<Tuple> tuples)
tuples
- A Collection of Tuples which contain the keys to use for searching for the entries
to unlock in the Space.SpaceResultList unlockAll(java.util.Collection<Tuple> tuples, UnlockOptions unlockOptions)
tuples
- A Collection of Tuples which contain the keys to use for searching for the entries
to unlock in the Space.unlockOptions
- Specifies custom lock wait options.Persister setPersister(Persister persister) throws ASException
persister
- Implementation of the Persister interface to be registered.ASException
- An exception is thrown if an error occurs while registering the Persister
object with the Space.void stopPersister(Persister persister) throws ASException
persister
- The Persister object to be stopped.ASException
- An exception is thrown if an error occurs while stopping the Persister object
or its associated thread.Router setRouter(Router router) throws ASException
router
- Implementation of the Router interface to be registered.ASException
- An exception is thrown if an error occurs while registering the Router
object with the Space.void stopRouter(Router router) throws ASException
router
- The Router object to be stopped.ASException
- An exception is thrown if an error occurs while stopping the Router object
or its associated thread.Listener listen(Listener listener) throws ASException
listener
- The Listener object which needs to be attached to the Space.ASException
- An exception is thrown if an error occurs while attaching the Listener object
to the Space.Listener listen(Listener listener, ListenerDef listenerDef) throws ASException
listener
- The Listener object which needs to be attached to the Space.listenerDef
- Used to specify custom distribution and time scopes.ASException
- An exception is thrown if an error occurs while attaching the Listener object
to the Space.Listener listen(Listener listener, java.lang.String filter) throws ASException
listener
- The Listener object which needs to be attached to the Space.filter
- A String that can be used to create a Filter
ASException
- An exception is thrown if an error occurs while attaching the Listener object
to the Space.Listener listen(Listener listener, ListenerDef listenerDef, java.lang.String filter) throws ASException
listener
- The Listener object which needs to be attached to the Space.listenerDef
- Used to specify custom distribution and time scopes.filter
- A String that can be used to create a Filter
ASException
- An exception is thrown if an error occurs while attaching the Listener object
to the Space.void stopListener(Listener listener) throws ASException
listener
- The Listener object to be stopped.ASException
- An exception is thrown if an error occurs while stopping the Listener object
or its associated thread.Browser browse(BrowserDef.BrowserType browserType) throws ASException
browserType
- Indicates the type of Browser object to be created. The browserType can be
one of GET, TAKE or LOCK as defined in
BrowserDef.BrowserType
.ASException
- An exception is thrown if an error occurs while creating the Browser object
or its associated thread.Browser browse(BrowserDef.BrowserType browserType, BrowserDef browserDef) throws ASException
browserType
- Indicates the type of Browser object to be created. The browserType can be
one of GET, TAKE or LOCK as defined in
BrowserDef.BrowserType
.browserDef
- Used to specify custom timeout values and distribution or time scopes.ASException
- An exception is thrown if an error occurs while creating the Browser object
or its associated thread.Browser browse(BrowserDef.BrowserType browserType, BrowserDef browserDef, java.lang.String filter) throws ASException
browserType
- Indicates the type of Browser object to be created. The browserType can be
one of GET, TAKE or LOCK as defined in
BrowserDef.BrowserType
.browserDef
- Used to specify custom timeout values and distribution or time scopes.filter
- A String that can be used to create a Filter
ASException
- An exception is thrown if an error occurs while creating the Browser object
or its associated thread.EventBrowser browseEvents(EventBrowserDef eventBrowserDef) throws ASException
eventBrowserDef
- Used to specify custom timeout values and distribution or time scopes.ASException
- An exception is thrown if an error occurs creating the EventBrowser object
or its associated thread.EventBrowser browseEvents(EventBrowserDef eventBrowserDef, java.lang.String filter) throws ASException
eventBrowserDef
- Used to specify custom timeout values and distribution or time scopes.filter
- A String that can be used to create a Filter
ASException
- An exception is thrown if an error occurs creating the EventBrowser object
or its associated thread.void clear(java.lang.String filter) throws ASException
Persistence behaviour
When share-all persistence is used, this method does not trigger onWrite callbacks.
It is user's responsibility to perform clear on the back-end database.
When share-nothing persistence is used, the in memory space data is kept synchronized with
the persistence files and entries are removed from file as well.
Listener behaviour
Listeners do not get callbacks for takes performed along with clear execution.
filter
- A String that can be used to create a Filter
ASException
- An exception is thrown if an error occurs while deleting entriesvoid clear() throws ASException
ASException
- An exception is thrown if an error occurs while deleting entriesSpaceDef getSpaceDef() throws ASException
ASException
- An exception is thrown if an error occurs retrieving the attributes of the Space.java.lang.String getName()
void setDistributionRole(Member.DistributionRole distributionRole) throws ASException
distributionRole
- Specifies whether the calling Member is a LEECH or SEEDER for the Space.ASException
- An exception is thrown if an error occurs while setting the distribution role
of the calling Member of the Space.long size() throws ASException
ASException
- An exception is thrown if an error occurs while retrieving the size of the Space.void resetStats() throws ASException
ASException
- An exception is thrown if an error occurs while resetting the statistics of all Space members.long size(java.lang.String filter) throws ASException
filter
- A String that can be used to create a Filter
.ASException
- An exception is thrown if an error occurs while retrieving the size of the Space.java.lang.String explainQuery(java.lang.String filter) throws ASException
filter
- A string that can be used to create a Filter
.ASException
- An exception is thrown if an error occurs while retrieving the cost of the query executionInvokeResult invoke(Tuple tuple, java.lang.String invocable, InvokeOptions options) throws ASException
invoke
method from the specified class on the Member of the Space
where the entry associated with the key specified in tuple
is stored. If an entry for the
key does not exist in the Space, the invoke
method is executed on the Member of the Space
where the entry would have been stored.
The Member of the Space where the invoke
method is executed must have the invoked class
present in its CLASSPATH for the invocation to succeed!tuple
- Contains the key used to direct invocation to the Member of the Space storing
the entry associated with the key.invocable
- The class that implements the Invocable
interface.ASException
- An exception is thrown if an error occurs during the invocation.@Deprecated InvokeResult invoke(Tuple tuple, InvokeOptions options) throws ASException
invoke(Tuple, String, InvokeOptions)
ASException
InvokeResult invokeMember(Member member, java.lang.String invocable, InvokeOptions options) throws ASException
invoke
method of the specified class on the specific Member of
the Space passed as an argument.
The Member of the Space where the invoke
method is executed must have the invoked class
present in its CLASSPATH for the invocation to succeed!member
- Member to execute the invoke
method on.invocable
- The class that implements the MemberInvocable
interface.ASException
- An exception is thrown if an error occurs during the invocation.@Deprecated InvokeResult invokeMember(Member member, InvokeOptions options) throws ASException
ASException
InvokeResultList invokeMembers(java.util.Collection<Member> members, java.lang.String invocable, InvokeOptions options) throws ASException
members
- Collection of Members to issue invocationinvocable
- The class that implements the MemberInvocable
interface.ASException
- An exception is thrown if an error occurs during the invocation.@Deprecated InvokeResultList invokeMembers(java.util.Collection<Member> members, InvokeOptions options) throws ASException
ASException
InvokeResultList invokeMembers(java.lang.String invocable, InvokeOptions invokeOptions) throws ASException
invoke
method of the specified class on all of the
members of the Space.
All members of the Space must have the specified class present in their CLASSPATH for the
invocation to succeed!invocable
- The class that implements the MemberInvocable
interface.invokeOptions
- InvokeOptionsASException
- An exception is thrown if an error occurs during the invocation.@Deprecated InvokeResultList invokeMembers(InvokeOptions invokeOptions) throws ASException
ASException
InvokeResultList invokeRemoteMembers(java.lang.String invocable, InvokeOptions invokeOptions) throws ASException
invoke
method of the specified class on all of the
remote members of the Space.
All remote members of the Space must have the specified class present in their CLASSPATH for the
invocation to succeed!invocable
- The class that implements the MemberInvocable
interface.invokeOptions
- InvokeOptionsASException
- An exception is thrown if an error occurs during the invocation.@Deprecated InvokeResultList invokeRemoteMembers(InvokeOptions invokeOptions) throws ASException
ASException
InvokeResultList invokeSeeders(java.lang.String invocable, InvokeOptions invokeOptions) throws ASException
invoke
method of the specified class on all of the
members of the Space which have a distribution role of seeder.
All seeder members of the Space must have the specified class present in their CLASSPATH for the
invocation to succeed!invocable
- The class that implements the MemberInvocable
interface.invokeOptions
- InvokeOptionsASException
- An exception is thrown if an error occurs during the invocation.@Deprecated InvokeResultList invokeSeeders(InvokeOptions invokeOptions) throws ASException
ASException
InvokeResultList invokeLeeches(java.lang.String invocable, InvokeOptions invokeOptions) throws ASException
invoke
method of the specified class on all of the
members of the Space which have a distribution role of leech.
All leech members of the Space must have the specified class present in their CLASSPATH for the
invocation to succeed!invocable
- The class that implements the MemberInvocable
interface.invokeOptions
- InvokeOptionsASException
- An exception is thrown if an error occurs during the invocation.@Deprecated InvokeResultList invokeLeeches(InvokeOptions invokeOptions) throws ASException
ASException
boolean isReady() throws ASException
ASException
- An exception is thrown if an error occurs while checking the state of the Space.void waitForReady() throws ASException
ASException
- An exception is thrown if an error occurs while checking the state of the Space.boolean waitForReady(long timeout) throws ASException
timeout
- Timeout in milliseconds.ASException
- An exception is thrown if an error occurs while checking the state of the Space.SpaceDef.SpaceState getSpaceState()
java.util.Collection<Member> getMembers() throws ASException
ASException
java.util.Collection<Member> getSeeders() throws ASException
ASException
java.util.Collection<Member> getLeeches() throws ASException
ASException
java.util.Collection<Member> getRemoteMembers() throws ASException
ASException
java.lang.Object min(java.lang.String fieldName) throws ASException
ASException
java.lang.Object max(java.lang.String fieldName) throws ASException
ASException
@Deprecated InvokeResult invoke(Tuple keyTuple, java.lang.String invocable, Tuple contextTuple) throws ASException
ASException
@Deprecated InvokeResult invoke(Tuple keyTuple, java.lang.Class<? extends Invocable> cls, Tuple contextTuple) throws ASException
ASException
@Deprecated InvokeResult invokeMember(Member member, java.lang.String invocable, Tuple contextTuple) throws ASException
ASException
@Deprecated InvokeResult invokeMember(Member member, java.lang.Class<? extends MemberInvocable> cls, Tuple contextTuple) throws ASException
ASException
@Deprecated InvokeResultList invokeMembers(java.util.Collection<Member> members, java.lang.String invocable, Tuple contextTuple) throws ASException
ASException
@Deprecated InvokeResultList invokeMembers(java.util.Collection<Member> members, java.lang.Class<? extends MemberInvocable> cls, Tuple contextTuple) throws ASException
ASException
@Deprecated InvokeResultList invokeMembers(java.lang.String invocable, Tuple contextTuple) throws ASException
ASException
@Deprecated InvokeResultList invokeMembers(java.lang.Class<? extends MemberInvocable> cls, Tuple contextTuple) throws ASException
ASException
@Deprecated InvokeResultList invokeSeeders(java.lang.String cls, Tuple contextTuple) throws ASException
ASException
@Deprecated InvokeResultList invokeSeeders(java.lang.Class<? extends MemberInvocable> cls, Tuple contextTuple) throws ASException
ASException
@Deprecated boolean isValid()
Copyright (c) 2014 Cloud Software Group, Inc. All rights reserved.