Class DefaultMultiClusterGigaSpace

java.lang.Object
org.openspaces.core.multicluster.DefaultMultiClusterGigaSpace
All Implemented Interfaces:
AutoCloseable, GigaSpace, MultiClusterGigaSpace

public class DefaultMultiClusterGigaSpace extends Object implements MultiClusterGigaSpace
The multi-cluster proxy: a GigaSpace over several already-deployed clusters that routes every operation according to the configured MultiClusterGigaSpace.WriteMode, MultiClusterGigaSpace.ReadMode and MultiClusterGigaSpace.FailoverPolicy.

Construct one directly and register the clusters, which is all a multi-cluster proxy needs:

DefaultMultiClusterGigaSpace gigaSpace = new DefaultMultiClusterGigaSpace("orders");
gigaSpace.registerCluster("us-east", east);        // the first registered becomes the active one
gigaSpace.registerCluster("us-west", west);
gigaSpace.setWriteMode(WriteMode.WRITE_SYNC);
gigaSpace.setReadMode(ReadMode.READ_ROUND_ROBIN);

gigaSpace.write(new Order(1));                     // applied to both clusters
...
gigaSpace.close();                                 // the cluster proxies stay yours to close

Or hand the clusters and the configuration to the constructor, which registers them in iteration order and makes the first one active:

Map<String, GigaSpace> clusters = new LinkedHashMap<>();
clusters.put("us-east", east);
clusters.put("us-west", west);
MultiClusterGigaSpace gigaSpace = new DefaultMultiClusterGigaSpace("orders",
        MultiClusterConfig.defaults().withWriteMode(WriteMode.WRITE_SYNC), clusters);

MultiClusterGigaSpaceConfigurer builds the same object with validation, a priority list and SpaceConfigurer support; prefer it when the topology is known up front. This class is the one to construct when the clusters arrive at runtime, or when a framework needs a plain constructor.

What it does not own

The cluster proxies are never owned by this object. Whatever you registered - a GigaSpace, or one a SpaceConfigurer built - stays yours to close. close() releases only what this proxy created: the write executors and the deferred-mutation queue.

Semantics worth knowing

Fan-out is not a distributed transaction; inside a transaction every operation is pinned to the active cluster. READ_ROUND_ROBIN is eventually consistent by construction - read-your-writes needs READ_ACTIVE. getClustered() and
invalid reference
#executorBuilder(Object...)
throw UnsupportedOperationException, because what they return would be a live handle onto one cluster that silently stops honouring the routing modes.

Extending it

Subclass it to build your own proxy. Every GigaSpace operation goes through one of the protected hooks routeRead(String, Function), routeMutation(OperationKind, String, boolean, Function), routeExecute(String, boolean, Function), routeLocal(String, Function) and routeDiagnostic(String, Function), so overriding one hook covers every overload in that category - auditing, metrics, tracing or an extra guard in one place. Individual operations and control methods can be overridden too; call super to keep the routing modes and failover. Give the subclass a (MultiClusterSetup) constructor and hand it to MultiClusterGigaSpaceConfigurer.proxyFactory or MultiClusterGigaSpaceFactoryBean.setProxyFactory(Function), so the configurer, a properties file or Spring build it instead of this class:
public class AuditedGigaSpace extends DefaultMultiClusterGigaSpace {
    public AuditedGigaSpace(MultiClusterSetup setup) {
        super(setup);
    }

    protected <R> R routeMutation(OperationKind kind, String operation, boolean async,
                                  Function<GigaSpace, R> call) {
        audit.record(operation, getActiveClusterName());
        return super.routeMutation(kind, operation, async, call);
    }
}

MultiClusterGigaSpace gigaSpace = new MultiClusterGigaSpaceConfigurer()
        .cluster("us-east", east)
        .cluster("us-west", west)
        .proxyFactory(AuditedGigaSpace::new)
        .gigaSpace();

Thread-safe: registration, configuration and failover may run concurrently with space operations.

Since:
18.0
See Also:
  • Constructor Details

    • DefaultMultiClusterGigaSpace

      public DefaultMultiClusterGigaSpace()
      An unnamed proxy with no clusters and the default configuration; register clusters to use it.
    • DefaultMultiClusterGigaSpace

      public DefaultMultiClusterGigaSpace(String name)
      A named proxy with no clusters and the default configuration.
    • DefaultMultiClusterGigaSpace

      public DefaultMultiClusterGigaSpace(String name, MultiClusterConfig config)
      A named proxy with no clusters yet; register them with registerCluster(String, GigaSpace).
    • DefaultMultiClusterGigaSpace

      public DefaultMultiClusterGigaSpace(String name, MultiClusterConfig config, Map<String, ? extends GigaSpace> clusters)
      A proxy over the given clusters, registered in iteration order - so pass a LinkedHashMap when the default failover order matters, since Map.of() does not preserve order. The first cluster registered becomes the active one.
    • DefaultMultiClusterGigaSpace

      public DefaultMultiClusterGigaSpace(String name, MultiClusterConfig config, Map<String, ? extends GigaSpace> clusters, boolean jmx)
      As above, and optionally exposed over JMX as org.openspaces.core.multicluster:type=MultiClusterGigaSpace,name=NAME - give each proxy in a JVM a distinct name if you turn it on.
    • DefaultMultiClusterGigaSpace

      public DefaultMultiClusterGigaSpace(MultiClusterSetup setup)
      Builds the proxy from an assembled setup - what MultiClusterGigaSpaceConfigurer produces, and the constructor a subclass calls from its own (MultiClusterSetup) constructor so that MultiClusterGigaSpaceConfigurer.proxyFactory can build it. Treat the setup as opaque: pass it on, do not take it apart.
    • DefaultMultiClusterGigaSpace

      public DefaultMultiClusterGigaSpace(MultiClusterSetup setup, ClusterAvailability availability)
      Builds the proxy with availability decided elsewhere, which turns off the built-in health tracking and failover machinery. Internal: used by tests and by embeddings that track cluster health themselves.
  • Method Details

    • setupFor

      protected static MultiClusterSetup setupFor(String name, MultiClusterConfig config, Map<String, ? extends GigaSpace> clusters, boolean jmx)
      Assembles a setup from a name, a configuration and clusters registered in iteration order, for a subclass that offers the same convenience constructors as this class.
    • router

      protected final MultiClusterRouter router()
      The router, for tests and for embeddings that need the health monitor or the deferred queue.
    • control

      protected final MultiClusterControlSupport control()
      The topology and mode controls every MultiClusterGigaSpace control method delegates to.
    • routeRead

      protected <R> R routeRead(String operation, Function<GigaSpace, R> call)
      Runs a read-style operation (read, count, readMultiple, aggregate, iterator, ...) on the cluster the read mode selects, retrying elsewhere per the failover policy.
      Parameters:
      operation - the GigaSpace method name, used in logs, stats and error messages
    • routeMutation

      protected <R> R routeMutation(OperationKind kind, String operation, boolean async, Function<GigaSpace, R> call)
      Runs a mutation (write, take, change, clear, ...) per the write mode: on the active cluster only, or fanned out to the others as well.
      Parameters:
      kind - what the mutation is, which decides how it may be fanned out and retried
      async - whether the operation returns a future, so the fan-out must not block on it
    • routeExecute

      protected <R> R routeExecute(String operation, boolean durable, Function<GigaSpace, R> call)
      Runs a task or durable-task operation on the active cluster; a plain execute is also fanned out when fanOutTasks is on.
      Parameters:
      durable - whether this is a durable-task call, which is never fanned out
    • routeLocal

      protected <R> R routeLocal(String operation, Function<GigaSpace, R> call)
      Runs a local or metadata call (getName, getSpace, default modifiers, ...) against the active cluster's proxy, without health tracking or failover.
    • routeDiagnostic

      protected List<Object> routeDiagnostic(String operation, Function<GigaSpace, ?> call)
      Runs a diagnostic call on every registered cluster and concatenates the results.
    • registerCluster

      public void registerCluster(String clusterName, GigaSpace spaceProxy)
      Description copied from interface: MultiClusterGigaSpace
      Registers a GigaSpace cluster proxy target under a named identifier. The first cluster registered becomes the active one unless an active cluster was already chosen.
      Specified by:
      registerCluster in interface MultiClusterGigaSpace
    • unregisterCluster

      public void unregisterCluster(String clusterName)
      Description copied from interface: MultiClusterGigaSpace
      Unregisters a target cluster by name. If it was the active cluster, the next cluster in the priority list is promoted.
      Specified by:
      unregisterCluster in interface MultiClusterGigaSpace
    • unregisterCluster

      public void unregisterCluster(GigaSpace spaceProxy)
      Description copied from interface: MultiClusterGigaSpace
      Unregisters a target cluster by its proxy instance.
      Specified by:
      unregisterCluster in interface MultiClusterGigaSpace
    • setActiveCluster

      public void setActiveCluster(String clusterName)
      Description copied from interface: MultiClusterGigaSpace
      Sets the primary active cluster by name. It takes the mutations and, with any read pin dropped, the MultiClusterGigaSpace.ReadMode.READ_ACTIVE reads too - reads and writes are back on one cluster.
      Specified by:
      setActiveCluster in interface MultiClusterGigaSpace
      See Also:
    • setActiveCluster

      public void setActiveCluster(GigaSpace spaceProxy)
      Description copied from interface: MultiClusterGigaSpace
      Sets the primary active cluster by direct instance reference.
      Specified by:
      setActiveCluster in interface MultiClusterGigaSpace
    • getActiveClusterName

      public String getActiveClusterName()
      Description copied from interface: MultiClusterGigaSpace
      Returns the name of the currently designated primary active cluster - the one taking mutations - or null if none.
      Specified by:
      getActiveClusterName in interface MultiClusterGigaSpace
    • getActiveCluster

      public GigaSpace getActiveCluster()
      Description copied from interface: MultiClusterGigaSpace
      Returns the currently designated primary active GigaSpace proxy, or null if none.
      Specified by:
      getActiveCluster in interface MultiClusterGigaSpace
    • setWriteActiveCluster

      public void setWriteActiveCluster(String clusterName)
      Description copied from interface: MultiClusterGigaSpace
      Makes clusterName the write-active cluster: mutations, transactions, task execution and metadata calls go there. Unlike MultiClusterGigaSpace.setActiveCluster(String) it leaves a pinned read cluster alone; with no pin, READ_ACTIVE reads follow the write role as usual.
      Specified by:
      setWriteActiveCluster in interface MultiClusterGigaSpace
    • setReadActiveCluster

      public void setReadActiveCluster(String clusterName)
      Description copied from interface: MultiClusterGigaSpace
      Pins MultiClusterGigaSpace.ReadMode.READ_ACTIVE reads to clusterName, separately from the cluster taking mutations - a dedicated read cluster and a dedicated write cluster.

      Reads served there see a write only once the WAN Gateway or a WRITE_SYNC fan-out has carried it over, so this gives up read-your-writes. Reads inside a transaction still go to the write-active cluster, where the transaction is. If the pinned cluster becomes unreachable the read role fails over on its own, to the next cluster in priority order that is not taking the writes, and the write role is left alone. MultiClusterGigaSpace.ReadMode.READ_ROUND_ROBIN reads ignore the pin.

      Specified by:
      setReadActiveCluster in interface MultiClusterGigaSpace
    • clearReadActiveCluster

      public void clearReadActiveCluster()
      Description copied from interface: MultiClusterGigaSpace
      Drops the read pin, so READ_ACTIVE reads follow the write-active cluster again.
      Specified by:
      clearReadActiveCluster in interface MultiClusterGigaSpace
    • getReadActiveClusterName

      public String getReadActiveClusterName()
      Description copied from interface: MultiClusterGigaSpace
      The cluster MultiClusterGigaSpace.ReadMode.READ_ACTIVE reads go to: the pinned read cluster, or the active cluster when nothing is pinned. null if there is neither.
      Specified by:
      getReadActiveClusterName in interface MultiClusterGigaSpace
    • getReadActiveCluster

      public GigaSpace getReadActiveCluster()
      Description copied from interface: MultiClusterGigaSpace
      The proxy of the cluster MultiClusterGigaSpace.getReadActiveClusterName() names, or null.
      Specified by:
      getReadActiveCluster in interface MultiClusterGigaSpace
    • getRegisteredClusters

      public Map<String, GigaSpace> getRegisteredClusters()
      Description copied from interface: MultiClusterGigaSpace
      Returns the registered clusters, keyed by name, in registration order.
      Specified by:
      getRegisteredClusters in interface MultiClusterGigaSpace
    • getCluster

      public GigaSpace getCluster(String clusterName)
      Description copied from interface: MultiClusterGigaSpace
      Resolves a GigaSpace proxy by its registered cluster name.
      Specified by:
      getCluster in interface MultiClusterGigaSpace
    • getClusterName

      public String getClusterName(GigaSpace spaceProxy)
      Description copied from interface: MultiClusterGigaSpace
      Resolves the registered cluster name for a given GigaSpace proxy instance.
      Specified by:
      getClusterName in interface MultiClusterGigaSpace
    • setWriteMode

      public void setWriteMode(MultiClusterGigaSpace.WriteMode mode)
      Specified by:
      setWriteMode in interface MultiClusterGigaSpace
    • getWriteMode

      public MultiClusterGigaSpace.WriteMode getWriteMode()
      Specified by:
      getWriteMode in interface MultiClusterGigaSpace
    • setReadMode

      public void setReadMode(MultiClusterGigaSpace.ReadMode mode)
      Specified by:
      setReadMode in interface MultiClusterGigaSpace
    • getReadMode

      public MultiClusterGigaSpace.ReadMode getReadMode()
      Specified by:
      getReadMode in interface MultiClusterGigaSpace
    • setFailoverPolicy

      public void setFailoverPolicy(MultiClusterGigaSpace.FailoverPolicy policy)
      Specified by:
      setFailoverPolicy in interface MultiClusterGigaSpace
    • getFailoverPolicy

      public MultiClusterGigaSpace.FailoverPolicy getFailoverPolicy()
      Specified by:
      getFailoverPolicy in interface MultiClusterGigaSpace
    • setClusterPriorityList

      public void setClusterPriorityList(List<String> priorityNames)
      Description copied from interface: MultiClusterGigaSpace
      Sets the ordered fallback list of cluster names for automated promotion. Registered clusters missing from the list keep their registration order behind the listed ones.
      Specified by:
      setClusterPriorityList in interface MultiClusterGigaSpace
    • getClusterPriorityList

      public List<String> getClusterPriorityList()
      Description copied from interface: MultiClusterGigaSpace
      The order clusters will actually be promoted in: the configured priorities first, then any registered cluster the configuration omits, minus anything removed by MultiClusterGigaSpace.removeClusterFromPriorityList(String) or dropped after a failure.

      It reports what failover will do rather than what was once configured - a cluster removed on failure is gone from this list, and one registered afterwards appears in it.

      Specified by:
      getClusterPriorityList in interface MultiClusterGigaSpace
    • addClusterToPriorityList

      public boolean addClusterToPriorityList(String clusterName)
      Description copied from interface: MultiClusterGigaSpace
      Makes a cluster a promotion candidate again, appended to the configured order if it was not in it.
      Specified by:
      addClusterToPriorityList in interface MultiClusterGigaSpace
      Returns:
      true if this call changed the list
    • removeClusterFromPriorityList

      public boolean removeClusterFromPriorityList(String clusterName)
      Description copied from interface: MultiClusterGigaSpace
      Removes a cluster from failover promotion without unregistering it.

      A cluster removed this way is not silently re-appended by the fallback ordering, unlike one that was simply never listed - otherwise a cluster dropped after a failure would be re-elected by the next promotion.

      Specified by:
      removeClusterFromPriorityList in interface MultiClusterGigaSpace
      Returns:
      true if this call changed the list
    • getReadRotation

      public List<String> getReadRotation()
      Description copied from interface: MultiClusterGigaSpace
      The clusters currently eligible for MultiClusterGigaSpace.ReadMode.READ_ROUND_ROBIN reads, in registration order.

      Registering a cluster puts it in the rotation. A failure takes it out - and leaves it out until this application decides it is ready, which is what MultiClusterGigaSpace.addClusterToReadRotation(String) is for.

      Specified by:
      getReadRotation in interface MultiClusterGigaSpace
    • addClusterToReadRotation

      public boolean addClusterToReadRotation(String clusterName)
      Description copied from interface: MultiClusterGigaSpace
      Puts a cluster back into round-robin reads after it was removed.
      Specified by:
      addClusterToReadRotation in interface MultiClusterGigaSpace
      Returns:
      true if this call changed the rotation
    • removeClusterFromReadRotation

      public boolean removeClusterFromReadRotation(String clusterName)
      Description copied from interface: MultiClusterGigaSpace
      Takes a cluster out of round-robin reads. It stays registered, and stays usable as the active cluster: the rotation governs balanced reads only, so removing the active cluster from it does not stop reads reaching that cluster through MultiClusterGigaSpace.ReadMode.READ_ACTIVE.
      Specified by:
      removeClusterFromReadRotation in interface MultiClusterGigaSpace
      Returns:
      true if this call changed the rotation
    • setFailureThreshold

      public void setFailureThreshold(int consecutiveFailuresThreshold)
      Description copied from interface: MultiClusterGigaSpace
      Sets the consecutive failure threshold required before marking a cluster unhealthy.
      Specified by:
      setFailureThreshold in interface MultiClusterGigaSpace
    • getFailureThreshold

      public int getFailureThreshold()
      Description copied from interface: MultiClusterGigaSpace
      Returns the consecutive failure threshold.
      Specified by:
      getFailureThreshold in interface MultiClusterGigaSpace
    • setFailureWindow

      public void setFailureWindow(Duration failureWindow)
      Description copied from interface: MultiClusterGigaSpace
      Defines the rolling window duration for error threshold evaluation.
      Specified by:
      setFailureWindow in interface MultiClusterGigaSpace
    • getFailureWindow

      public Duration getFailureWindow()
      Description copied from interface: MultiClusterGigaSpace
      Returns the rolling failure window.
      Specified by:
      getFailureWindow in interface MultiClusterGigaSpace
    • isClusterHealthy

      public boolean isClusterHealthy(String clusterName)
      Description copied from interface: MultiClusterGigaSpace
      Returns true if the cluster identified by name is reachable.
      Specified by:
      isClusterHealthy in interface MultiClusterGigaSpace
    • isClusterHealthy

      public boolean isClusterHealthy(GigaSpace spaceProxy)
      Description copied from interface: MultiClusterGigaSpace
      Returns true if the specified GigaSpace cluster instance is reachable.
      Specified by:
      isClusterHealthy in interface MultiClusterGigaSpace
    • failoverToNextCluster

      public void failoverToNextCluster()
      Description copied from interface: MultiClusterGigaSpace
      Forcefully triggers failover to the next healthy cluster in the priority list.
      Specified by:
      failoverToNextCluster in interface MultiClusterGigaSpace
    • addClusterStateListener

      public void addClusterStateListener(MultiClusterGigaSpace.ClusterStateListener listener)
      Specified by:
      addClusterStateListener in interface MultiClusterGigaSpace
    • removeClusterStateListener

      public void removeClusterStateListener(MultiClusterGigaSpace.ClusterStateListener listener)
      Specified by:
      removeClusterStateListener in interface MultiClusterGigaSpace
    • addClusterEventListener

      public void addClusterEventListener(ClusterEventListener listener)
      Description copied from interface: MultiClusterGigaSpace
      Registers a listener that receives the same events with an explicit ClusterEventType rather than the convention below.
      Specified by:
      addClusterEventListener in interface MultiClusterGigaSpace
    • removeClusterEventListener

      public void removeClusterEventListener(ClusterEventListener listener)
      Specified by:
      removeClusterEventListener in interface MultiClusterGigaSpace
    • getName

      public String getName()
      Description copied from interface: GigaSpace
      Returns the name of the GigaSpace. If it is configured with Spring for example, will return the bean name, if not, will default to the space name.
      Specified by:
      getName in interface GigaSpace
    • getSpaceName

      public String getSpaceName()
      Description copied from interface: GigaSpace
      Returns the space name.
      Specified by:
      getSpaceName in interface GigaSpace
    • isSecured

      public boolean isSecured()
      Description copied from interface: GigaSpace
      Returns wether or not this space is secured.
      Specified by:
      isSecured in interface GigaSpace
      Returns:
      true if this space is secured, false otherwise.
    • getSpace

      public IJSpace getSpace()
      Description copied from interface: GigaSpace
      Returns the IJSpace used by this GigaSpace implementation to delegate different space operations.

      Allows the use of space operations that are not exposed by this interface, as well as use as a parameter to other low level GigaSpace components.

      If a transaction object is required for low level operations (as low level operations do not have declarative transaction ex) the GigaSpace.getTxProvider() should be used to acquire the current running transaction.

      Specified by:
      getSpace in interface GigaSpace
    • getClustered

      public GigaSpace getClustered()
      Description copied from interface: GigaSpace
      Returns a clustered view of this GigaSpace instance.

      GigaSpace gigaSpace = new GigaSpaceConfigurer(space).clustered(true).gigaSpace();
      

      If this instance is already a clustered view (was initially constructed using the clustered flag), will return the same instance being used to issue the call.

      If this is a GigaSpace that works directly with a cluster member, will return a clustered view (as if it was constructed with the clustered flag set). Note that this method might return different instances when being called by different threads.

      GigaSpace nonClusteredViewOfGigaSpace= ... // acquire non-clustered view of a clustered
      space
      GigaSpace space=nonClusteredViewofGigaSpace.getClustered();
      // space != nonClusteredViewOfSpace
      

      GigaSpace clusteredViewOfGigaSpace= ... // acquire clustered view of a clustered space
      GigaSpace space=clusteredViewofGigaSpace.getClustered();
      // space == clusteredViewOfSpace
      
      Specified by:
      getClustered in interface GigaSpace
      See Also:
    • getTxProvider

      public TransactionProvider getTxProvider()
      Description copied from interface: GigaSpace
      Returns the transaction provider allowing to access the current running transaction.
      Specified by:
      getTxProvider in interface GigaSpace
    • getCurrentTransaction

      public Transaction getCurrentTransaction()
      Description copied from interface: GigaSpace
      Returns the current running transaction. Can be null if no transaction is in progress.
      Specified by:
      getCurrentTransaction in interface GigaSpace
    • getExceptionTranslator

      public ExceptionTranslator getExceptionTranslator()
      Description copied from interface: GigaSpace
      Returns the exception translator associated with this GigaSpace instance.
      Specified by:
      getExceptionTranslator in interface GigaSpace
    • getDefaultWriteModifiers

      public WriteModifiers getDefaultWriteModifiers()
      Description copied from interface: GigaSpace
      Gets the default WriteModifiers set during this GigaSpace configuration. This value is configured either by using a GigaSpaceConfigurer or through the pu.xml.
      Specified by:
      getDefaultWriteModifiers in interface GigaSpace
    • getDefaultClearModifiers

      public ClearModifiers getDefaultClearModifiers()
      Description copied from interface: GigaSpace
      Gets the default ClearModifiers set during this GigaSpace configuration. This value is configured either by using a GigaSpaceConfigurer or through the pu.xml.
      Specified by:
      getDefaultClearModifiers in interface GigaSpace
    • getDefaultCountModifiers

      public CountModifiers getDefaultCountModifiers()
      Description copied from interface: GigaSpace
      Gets the default CountModifiers set during this GigaSpace configuration. This value is configured either by using a GigaSpaceConfigurer or through the pu.xml. If there is an active transaction and that transaction has any isolation level set on it, that isolation level will be merged into the returned modifiers with any previously set isolation level on the modifiers overriden.
      Specified by:
      getDefaultCountModifiers in interface GigaSpace
    • getDefaultReadModifiers

      public ReadModifiers getDefaultReadModifiers()
      Description copied from interface: GigaSpace
      Gets the default ReadModifiers set during this GigaSpace configuration. This value is configured either by using a GigaSpaceConfigurer or through the pu.xml. If there is an active transaction and that transaction has any isolation level set on it, that isolation level will be merged into the returned modifiers with any previously set isolation level on the modifiers overriden.
      Specified by:
      getDefaultReadModifiers in interface GigaSpace
    • getDefaultTakeModifiers

      public TakeModifiers getDefaultTakeModifiers()
      Description copied from interface: GigaSpace
      Gets the default TakeModifiers set during this GigaSpace configuration. This value is configured either by using a GigaSpaceConfigurer or through the pu.xml.
      Specified by:
      getDefaultTakeModifiers in interface GigaSpace
    • getDefaultChangeModifiers

      public ChangeModifiers getDefaultChangeModifiers()
      Description copied from interface: GigaSpace
      Gets the default ChangeModifiers set during this GigaSpace configuration. This value is configured either by using a GigaSpaceConfigurer or through the pu.xml.
      Specified by:
      getDefaultChangeModifiers in interface GigaSpace
    • clear

      public void clear(Object template)
      Description copied from interface: GigaSpace
      Removes the entries that match the specified template and the specified transaction from this space.

      If the clear operation conducted without transaction (null as value) it will clear all entries that are not under transaction. Therefore entries under transaction would not be removed from the space.

      The clear operation supports inheritance, therefore template class matching objects and its sub classes matching objects are part of the candidates population to be removed from the space. You can in fact clean all space objects (that are not under transaction) by calling: gigaSpace.clear(null).

      Notice: The clear operation does not remove notify templates, i.e. registration for notifications.

      Specified by:
      clear in interface GigaSpace
      Parameters:
      template - the template to use for matching
    • clear

      public int clear(Object template, ClearModifiers modifiers)
      Description copied from interface: GigaSpace
      Removes the entries that match the specified template and the specified transaction from this space.

      If the clear operation conducted without transaction (null as value) it will clear all entries that are not under transaction. Therefore entries under transaction would not be removed from the space.

      The clear operation supports inheritance, therefore template class matching objects and its sub classes matching objects are part of the candidates population to be removed from the space. You can in fact remove all space objects (that are not under transaction) by calling: gigaSpace.clear(null).

      Notice: The clear operation does not remove notify templates i.e. registration for notifications.

      Specified by:
      clear in interface GigaSpace
      Parameters:
      template - the template to use for matching
      modifiers - one or a union of ClearModifiers.
      Returns:
      The number of cleared entries
    • clear

      public int clear(Object template, int maxEntries, ClearModifiers modifiers)
      Description copied from interface: GigaSpace
      Removes up to maxEntries entries that match the specified template from this space, under the current transaction (if any). In mixed-version rolling upgrades, bounded clear may fall back to an unbounded clear to maintain cluster consistency, in which case more than maxEntries entries may be removed. If executed without a transaction, only entries not under transaction are cleared. The clear operation supports inheritance.

      Notice: The clear operation does not remove notify templates i.e. registration for notifications.

      Specified by:
      clear in interface GigaSpace
      Parameters:
      template - the template to use for matching
      maxEntries - the maximum number of entries to remove. Use Integer.MAX_VALUE for an unbounded clear (equivalent to GigaSpace.clear(Object, ClearModifiers)).
      modifiers - one or a union of ClearModifiers.
      Returns:
      The number of cleared entries
    • count

      public int count(Object template)
      Description copied from interface: GigaSpace
      Count any matching entry from the space. If a running within a transaction will count all the entries visible under the transaction.
      Specified by:
      count in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      Returns:
      The number of matching entries
    • count

      public int count(Object template, CountModifiers modifiers)
      Description copied from interface: GigaSpace
      Count any matching entries from the space. If this is running within a transaction will count all the entries visible under the transaction.

      Allows to specify modifiers using ReadModifiers which allows to programmatically control the isolation level this count operation will be performed under.

      Specified by:
      count in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      modifiers - one or a union of CountModifiers.
      Returns:
      The number of matching entries
    • snapshot

      public <T> ISpaceQuery<T> snapshot(Object entry)
      Description copied from interface: GigaSpace

      The process of serializing an entry for transmission to a JavaSpaces service will be identical if the same entry is used twice. This is most likely to be an issue with templates that are used repeatedly to search for entries with read or take.

      The client-side implementations of read and take cannot reasonably avoid this duplicated effort, since they have no efficient way of checking whether the same template is being used without intervening modification.

      The snapshot method gives the JavaSpaces service implementor a way to reduce the impact of repeated use of the same entry. Invoking snapshot with an Entry will return another Entry object that contains a snapshot of the original entry. Using the returned snapshot entry is equivalent to using the unmodified original entry in all operations on the same JavaSpaces service.

      Modifications to the original entry will not affect the snapshot. You can snapshot a null template; snapshot may or may not return null given a null template. The entry returned from snapshot will be guaranteed equivalent to the original unmodified object only when used with the space. Using the snapshot with any other JavaSpaces service will generate an IllegalArgumentException unless the other space can use it because of knowledge about the JavaSpaces service that generated the snapshot.

      The snapshot will be a different object from the original, may or may not have the same hash code, and equals may or may not return true when invoked with the original object, even if the original object is unmodified. A snapshot is guaranteed to work only within the virtual machine in which it was generated. If a snapshot is passed to another virtual machine (for example, in a parameter of an RMI call), using it--even with the same JavaSpaces service--may generate an IllegalArgumentException.

      Specified by:
      snapshot in interface GigaSpace
      Parameters:
      entry - The entry to snapshot
      Returns:
      The snapshot
    • readById

      public <T> T readById(Class<T> clazz, Object id)
      Description copied from interface: GigaSpace
      Read an object from the space matching its id and the class. Returns null if there is no match.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

      Specified by:
      readById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readById

      public <T> T readById(Class<T> clazz, Object id, Object routing)
      Description copied from interface: GigaSpace
      Read an object from the space matching its id, the class and the routing value. Returns null if there is no match.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      readById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readById

      public <T> T readById(Class<T> clazz, Object id, Object routing, long timeout)
      Description copied from interface: GigaSpace
      Read an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.
      Specified by:
      readById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readById

      public <T> T readById(Class<T> clazz, Object id, Object routing, long timeout, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.
      Specified by:
      readById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      modifiers - one or a union of ReadModifiers.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readById

      public <T> T readById(IdQuery<T> query)
      Description copied from interface: GigaSpace
      Read an object from the space matching the specified id query. Returns null if there is no match.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

      Specified by:
      readById in interface GigaSpace
      Parameters:
      query - Query to search by.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readById

      public <T> T readById(IdQuery<T> query, long timeout)
      Description copied from interface: GigaSpace
      Read an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.
      Specified by:
      readById in interface GigaSpace
      Parameters:
      query - Query to search by.
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readById

      public <T> T readById(IdQuery<T> query, long timeout, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.
      Specified by:
      readById in interface GigaSpace
      Parameters:
      query - Query to search by.
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      modifiers - one or a union of ReadModifiers.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • read

      public <T> T read(T template)
      Description copied from interface: GigaSpace
      Read any matching object from the space, blocking until one exists. Return null if the timeout expires.

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      read in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      Returns:
      A copy of the object read from the space.
    • read

      public <T> T read(T template, long timeout)
      Description copied from interface: GigaSpace
      Read any matching object from the space, blocking until one exists. Return null if the timeout expires.
      Specified by:
      read in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      Returns:
      A copy of the object read from the space.
    • read

      public <T> T read(T template, long timeout, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read any matching object from the space, blocking until one exists. Return null if the timeout expires.

      Overloads GigaSpace.read(Object, long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

      Specified by:
      read in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of ReadModifiers.
      Returns:
      A copy of the object read from the space.
    • read

      public <T> T read(ISpaceQuery<T> template)
      Description copied from interface: GigaSpace
      Read any matching object from the space, blocking until one exists. Return null if the timeout expires.

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      read in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      Returns:
      A copy of the object read from the space.
    • read

      public <T> T read(ISpaceQuery<T> template, long timeout)
      Description copied from interface: GigaSpace
      Read any matching object from the space, blocking until one exists. Return null if the timeout expires.
      Specified by:
      read in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      Returns:
      A copy of the object read from the space.
    • read

      public <T> T read(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read any matching object from the space, blocking until one exists. Return null if the timeout expires.

      Overloads GigaSpace.read(Object, long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

      Specified by:
      read in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of ReadModifiers.
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(T template)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(T template, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      listener - A listener to be notified when a result arrives
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(T template, long timeout)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(T template, long timeout, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      listener - A listener to be notified when a result arrives
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(T template, long timeout, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Overloads GigaSpace.asyncRead(Object, long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of ReadModifiers.
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(T template, long timeout, ReadModifiers modifiers, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Overloads GigaSpace.asyncRead(Object, long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of ReadModifiers.
      listener - A listener to be notified when a result arrives
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      listener - A listener to be notified when a result arrives
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template, long timeout)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template, long timeout, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      listener - A listener to be notified when a result arrives
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Overloads GigaSpace.asyncRead(Object, long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of ReadModifiers.
      Returns:
      A copy of the object read from the space.
    • asyncRead

      public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Overloads GigaSpace.asyncRead(Object, long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

      Specified by:
      asyncRead in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of ReadModifiers.
      listener - A listener to be notified when a result arrives
      Returns:
      A copy of the object read from the space.
    • readIfExistsById

      public <T> T readIfExistsById(Class<T> clazz, Object id)
      Description copied from interface: GigaSpace
      Read an object from the space matching its id and the class. Returns null if there is no match.

      Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

      Specified by:
      readIfExistsById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readIfExistsById

      public <T> T readIfExistsById(Class<T> clazz, Object id, Object routing)
      Description copied from interface: GigaSpace
      Read an object from the space matching its id, the class and the routing value. Returns null if there is no match.

      Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      readIfExistsById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readIfExistsById

      public <T> T readIfExistsById(Class<T> clazz, Object id, Object routing, long timeout)
      Description copied from interface: GigaSpace
      Read an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

      Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Specified by:
      readIfExistsById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readIfExistsById

      public <T> T readIfExistsById(Class<T> clazz, Object id, Object routing, long timeout, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

      Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Specified by:
      readIfExistsById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      modifiers - one or a union of ReadModifiers.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readIfExistsById

      public <T> T readIfExistsById(IdQuery<T> query)
      Description copied from interface: GigaSpace
      Read an object from the space matching the specified id query. Returns null if there is no match.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

      Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Specified by:
      readIfExistsById in interface GigaSpace
      Parameters:
      query - Query to search by.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readIfExistsById

      public <T> T readIfExistsById(IdQuery<T> query, long timeout)
      Description copied from interface: GigaSpace
      Read an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

      Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Specified by:
      readIfExistsById in interface GigaSpace
      Parameters:
      query - Query to search by.
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readIfExistsById

      public <T> T readIfExistsById(IdQuery<T> query, long timeout, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

      Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Specified by:
      readIfExistsById in interface GigaSpace
      Parameters:
      query - Query to search by.
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      modifiers - one or a union of ReadModifiers.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • readIfExists

      public <T> T readIfExists(T template)
      Description copied from interface: GigaSpace
      Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      readIfExists in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      Returns:
      A copy of the object read from the space.
    • readIfExists

      public <T> T readIfExists(T template, long timeout)
      Description copied from interface: GigaSpace
      Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.
      Specified by:
      readIfExists in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      Returns:
      A copy of the object read from the space.
    • readIfExists

      public <T> T readIfExists(T template, long timeout, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Overloads GigaSpace.read(Object, long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

      Specified by:
      readIfExists in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of ReadModifiers.
      Returns:
      A copy of the object read from the space.
    • readIfExists

      public <T> T readIfExists(ISpaceQuery<T> template)
      Description copied from interface: GigaSpace
      Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      readIfExists in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      Returns:
      A copy of the object read from the space.
    • readIfExists

      public <T> T readIfExists(ISpaceQuery<T> template, long timeout)
      Description copied from interface: GigaSpace
      Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.
      Specified by:
      readIfExists in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      Returns:
      A copy of the object read from the space.
    • readIfExists

      public <T> T readIfExists(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Overloads GigaSpace.read(Object, long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

      Specified by:
      readIfExists in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of ReadModifiers.
      Returns:
      A copy of the object read from the space.
    • readMultiple

      public <T> T[] readMultiple(T template)
      Description copied from interface: GigaSpace
      Read any matching entries from the space. Matching is done as in read without timeout (0). Returns an unbounded array of matches. Returns an empty array if no match was found. Same as calling readMultiple(template, Integer.MAX_VALUE).
      Specified by:
      readMultiple in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      Returns:
      A copy of the entries read from the space.
    • readMultiple

      public <T> T[] readMultiple(T template, int maxEntries)
      Description copied from interface: GigaSpace
      Read any matching entries from the space. Matching is done as in read without timeout (0). Returns an array with matches bound by maxEntries. Returns an empty array if no match was found.
      Specified by:
      readMultiple in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
      Returns:
      A copy of the entries read from the space.
    • readMultiple

      public <T> T[] readMultiple(T template, int maxEntries, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read any matching entries from the space. Matching is done as in read without timeout (0). Returns an array with matches bound by maxEntries. Returns an empty array if no match was found.

      Overloads GigaSpace.readMultiple(Object, int) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

      Specified by:
      readMultiple in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
      modifiers - one or a union of ReadModifiers.
      Returns:
      A copy of the entries read from the space.
    • readMultiple

      public <T> T[] readMultiple(ISpaceQuery<T> template)
      Description copied from interface: GigaSpace
      Read any matching entries from the space. Matching is done as in read without timeout (0). Returns an unbounded array of matches. Returns an empty array if no match was found.
      Specified by:
      readMultiple in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      Returns:
      A copy of the entries read from the space.
    • readMultiple

      public <T> T[] readMultiple(ISpaceQuery<T> template, int maxEntries)
      Description copied from interface: GigaSpace
      Read any matching entries from the space. Matching is done as in read without timeout (0). Returns an array with matches bound by maxEntries. Returns an empty array if no match was found.
      Specified by:
      readMultiple in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
      Returns:
      A copy of the entries read from the space.
    • readMultiple

      public <T> T[] readMultiple(ISpaceQuery<T> template, int maxEntries, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read any matching entries from the space. Matching is done as in read without timeout (0). Returns an array with matches bound by maxEntries. Returns an empty array if no match was found.

      Overloads GigaSpace.readMultiple(Object, int) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

      Specified by:
      readMultiple in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
      modifiers - one or a union of ReadModifiers.
      Returns:
      A copy of the entries read from the space.
    • readByIds

      public <T> ReadByIdsResult<T> readByIds(Class<T> clazz, Object[] ids)
      Description copied from interface: GigaSpace
      Read objects from the space matching their IDs and the specified class.

      Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will broadcast to all partitions. Use GigaSpace.readByIds(Class, Object[], Object) to specify the routing explicitly and avoid broadcast if needed.

      Specified by:
      readByIds in interface GigaSpace
      Parameters:
      clazz - The class.
      ids - The object IDs array.
      Returns:
      a ReadByIdsResult containing the matched results.
    • readByIds

      public <T> ReadByIdsResult<T> readByIds(Class<T> clazz, Object[] ids, Object routingKey)
      Description copied from interface: GigaSpace
      Read objects from the space matching their IDs, the specified class and routing key.

      Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to routingKey. If it is null, the operation will broadcast to all partitions.

      Specified by:
      readByIds in interface GigaSpace
      Parameters:
      clazz - The class.
      ids - The object IDs array.
      routingKey - The routing of the provided object IDs.
      Returns:
      a ReadByIdsResult containing the matched results.
    • readByIds

      public <T> ReadByIdsResult<T> readByIds(Class<T> clazz, Object[] ids, Object routingKey, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read objects from the space matching their IDs, the specified class type and routing key, with the provided ReadModifiers.

      Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to routingKey. If it is null, the operation will broadcast to all partitions.

      ReadModifiers.FIFO is not supported by this operation - the results are always ordered in correlation with the input IDs array.

      Specified by:
      readByIds in interface GigaSpace
      Parameters:
      clazz - The class.
      ids - The object IDs array.
      routingKey - The routing of the provided object IDs.
      modifiers - The read modifier to use (One or several of ReadModifiers).
      Returns:
      a ReadByIdsResult containing the matched results.
    • readByIds

      public <T> ReadByIdsResult<T> readByIds(Class<T> clazz, Object[] ids, Object[] routingKeys)
      Description copied from interface: GigaSpace
      Read objects from the space matching their IDs, the specified class and the routing keys.

      Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to routingKeys. If it is null, the operation will broadcast to all partitions. routingKeys should be correlated with ids, i.e. their length should be the same, and the routing key of ID i in the IDs array is the element at position i in the routing keys array.

      Specified by:
      readByIds in interface GigaSpace
      Parameters:
      clazz - The class.
      ids - The object IDs array.
      routingKeys - The object routing keys array.
      Returns:
      a ReadByIdsResult containing the matched results.
    • readByIds

      public <T> ReadByIdsResult<T> readByIds(Class<T> clazz, Object[] ids, Object[] routingKeys, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read objects from the space matching their IDs, the specified class and the routing keys, with the provided ReadModifiers.

      Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to routingKeys. If it is null, the operation will broadcast to all partitions. routingKeys should be correlated with ids, i.e. their length should be the same, and the routing key of ID i in the IDs array is the element at position i in the routing keys array.

      ReadModifiers.FIFO is not supported by this operation - the results are always ordered in correlation with the input IDs array.

      Specified by:
      readByIds in interface GigaSpace
      Parameters:
      clazz - The class type.
      ids - The objects\ IDs array.
      routingKeys - The object routing keys array.
      modifiers - The read modifier to use (One or several of ReadModifiers).
      Returns:
      a ReadByIdsResult containing the matched results.
    • readByIds

      public <T> ReadByIdsResult<T> readByIds(IdsQuery<T> query)
      Description copied from interface: GigaSpace
      Read objects from the space matching the specified IDs query.
      Specified by:
      readByIds in interface GigaSpace
      Parameters:
      query - Query to search by.
      Returns:
      a ReadByIdsResult containing the matched results.
    • readByIds

      public <T> ReadByIdsResult<T> readByIds(IdsQuery<T> query, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Read objects from the space matching the specified IDs query, with the provided ReadModifiers.
      Specified by:
      readByIds in interface GigaSpace
      Parameters:
      query - Query to search by.
      modifiers - The read modifier to use (One or several of ReadModifiers).
      Returns:
      a ReadByIdsResult containing the matched results.
    • takeByIds

      public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz, Object[] ids)
      Description copied from interface: GigaSpace
      Take (remove) objects from the space matching their IDs and the specified class.

      Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will broadcast to all partitions. Use GigaSpace.readByIds(Class, Object[], Object) to specify the routing explicitly and avoid broadcast if needed.

      Specified by:
      takeByIds in interface GigaSpace
      Parameters:
      clazz - The class.
      ids - The object IDs array.
      Returns:
      a TakeByIdsResult containing the matched results.
    • takeByIds

      public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz, Object[] ids, Object routingKey)
      Description copied from interface: GigaSpace
      Take (remove) objects from the space matching their IDs, the specified class and routing key.

      Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to routingKey. If it is null, the operation will broadcast to all partitions.

      Specified by:
      takeByIds in interface GigaSpace
      Parameters:
      clazz - The class.
      ids - The object IDs array.
      routingKey - The routing of the provided object IDs.
      Returns:
      a TakeByIdsResult containing the matched results.
    • takeByIds

      public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz, Object[] ids, Object routingKey, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) objects from the space matching their IDs, the specified class type and routing key, with the provided ReadModifiers.

      Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to routingKey. If it is null, the operation will broadcast to all partitions.

      ReadModifiers.FIFO is not supported by this operation - the results are always ordered in correlation with the input IDs array.

      Specified by:
      takeByIds in interface GigaSpace
      Parameters:
      clazz - The class.
      ids - The object IDs array.
      routingKey - The routing of the provided object IDs.
      modifiers - The read modifier to use (One or several of ReadModifiers).
      Returns:
      a TakeByIdsResult containing the matched results.
    • takeByIds

      public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz, Object[] ids, Object[] routingKeys)
      Description copied from interface: GigaSpace
      Take (remove) objects from the space matching their IDs, the specified class and the routing keys.

      Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to routingKeys. If it is null, the operation will broadcast to all partitions. routingKeys should be correlated with ids, i.e. their length should be the same, and the routing key of ID i in the IDs array is the element at position i in the routing keys array.

      Specified by:
      takeByIds in interface GigaSpace
      Parameters:
      clazz - The class.
      ids - The object IDs array.
      routingKeys - The object routing keys array.
      Returns:
      a TakeByIdsResult containing the matched results.
    • takeByIds

      public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz, Object[] ids, Object[] routingKeys, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) objects from the space matching their IDs, the specified class and the routing keys, with the provided ReadModifiers.

      Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to routingKeys. If it is null, the operation will broadcast to all partitions. routingKeys should be correlated with ids, i.e. their length should be the same, and the routing key of ID i in the IDs array is the element at position i in the routing keys array.

      ReadModifiers.FIFO is not supported by this operation - the results are always ordered in correlation with the input IDs array.

      Specified by:
      takeByIds in interface GigaSpace
      Parameters:
      clazz - The class type.
      ids - The objects\ IDs array.
      routingKeys - The object routing keys array.
      modifiers - The read modifier to use (One or several of ReadModifiers).
      Returns:
      a TakeByIdsResult containing the matched results.
    • takeByIds

      public <T> TakeByIdsResult<T> takeByIds(IdsQuery<T> query)
      Description copied from interface: GigaSpace
      Take (remove) objects from the space matching the specified IDs query.
      Specified by:
      takeByIds in interface GigaSpace
      Parameters:
      query - Query to search by.
      Returns:
      a ReadByIdsResult containing the matched results.
    • takeByIds

      public <T> TakeByIdsResult<T> takeByIds(IdsQuery<T> query, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) objects from the space matching the specified IDs query, with the provided ReadModifiers.
      Specified by:
      takeByIds in interface GigaSpace
      Parameters:
      query - Query to search by.
      modifiers - The read modifier to use (One or several of ReadModifiers).
      Returns:
      a ReadByIdsResult containing the matched results.
    • takeById

      public <T> T takeById(Class<T> clazz, Object id)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching its id and the class. Returns null if there is no match.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.takeById(Class, Object, Object) can be used to specify the routing.

      Specified by:
      takeById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeById

      public <T> T takeById(Class<T> clazz, Object id, Object routing)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      takeById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeById

      public <T> T takeById(Class<T> clazz, Object id, Object routing, long timeout)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.
      Specified by:
      takeById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeById

      public <T> T takeById(Class<T> clazz, Object id, Object routing, long timeout, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.
      Specified by:
      takeById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      modifiers - one or a union of TakeModifiers.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeById

      public <T> T takeById(IdQuery<T> query)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching the specified id query. Returns null if there is no match.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

      Specified by:
      takeById in interface GigaSpace
      Parameters:
      query - Query to search by.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeById

      public <T> T takeById(IdQuery<T> query, long timeout)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.
      Specified by:
      takeById in interface GigaSpace
      Parameters:
      query - Query to search by.
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeById

      public <T> T takeById(IdQuery<T> query, long timeout, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.
      Specified by:
      takeById in interface GigaSpace
      Parameters:
      query - Query to search by.
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      modifiers - one or a union of TakeModifiers.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • take

      public <T> T take(T template)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      take in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      Returns:
      A removed entry from the space
    • take

      public <T> T take(T template, long timeout)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.
      Specified by:
      take in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      Returns:
      A removed entry from the space
    • take

      public <T> T take(T template, long timeout, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.
      Specified by:
      take in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of TakeModifiers.
      Returns:
      A removed entry from the space
    • take

      public <T> T take(ISpaceQuery<T> template)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      take in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      Returns:
      A removed entry from the space
    • take

      public <T> T take(ISpaceQuery<T> template, long timeout)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.
      Specified by:
      take in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      Returns:
      A removed entry from the space
    • take

      public <T> T take(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.
      Specified by:
      take in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of TakeModifiers.
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(T template)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(T template, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      listener - A listener to be notified when a result arrives
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(T template, long timeout)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(T template, long timeout, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      listener - A listener to be notified when a result arrives
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(T template, long timeout, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of TakeModifiers.
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(T template, long timeout, TakeModifiers modifiers, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of TakeModifiers.
      listener - A listener to be notified when a result arrives
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      listener - A listener to be notified when a result arrives.
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template, long timeout)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template, long timeout, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      listener - A listener to be notified when a result arrives.
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of TakeModifiers.
      Returns:
      A removed entry from the space
    • asyncTake

      public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).
      Specified by:
      asyncTake in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of TakeModifiers.
      listener - A listener to be notified when a result arrives.
      Returns:
      A removed entry from the space
    • takeIfExistsById

      public <T> T takeIfExistsById(Class<T> clazz, Object id)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching its id and the class. Returns null if there is no match.

      Matching and timeouts are done as in takeById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.takeById(Class, Object, Object) can be used to specify the routing.

      Specified by:
      takeIfExistsById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeIfExistsById

      public <T> T takeIfExistsById(Class<T> clazz, Object id, Object routing)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match.

      Matching and timeouts are done as in takeById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      takeIfExistsById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeIfExistsById

      public <T> T takeIfExistsById(Class<T> clazz, Object id, Object routing, long timeout)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

      Matching and timeouts are done as in takeById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Specified by:
      takeIfExistsById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeIfExistsById

      public <T> T takeIfExistsById(Class<T> clazz, Object id, Object routing, long timeout, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

      Matching and timeouts are done as in takeById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Specified by:
      takeIfExistsById in interface GigaSpace
      Parameters:
      clazz - The class of the entry
      id - The id of the entry
      routing - The routing value
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      modifiers - one or a union of TakeModifiers.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeIfExistsById

      public <T> T takeIfExistsById(IdQuery<T> query)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching the specified id query. Returns null if there is no match.

      The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

      Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Specified by:
      takeIfExistsById in interface GigaSpace
      Parameters:
      query - Query to search by.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeIfExistsById

      public <T> T takeIfExistsById(IdQuery<T> query, long timeout)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

      Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Specified by:
      takeIfExistsById in interface GigaSpace
      Parameters:
      query - Query to search by.
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeIfExistsById

      public <T> T takeIfExistsById(IdQuery<T> query, long timeout, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

      Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Specified by:
      takeIfExistsById in interface GigaSpace
      Parameters:
      query - Query to search by.
      timeout - The timeout value to wait for a matching entry if it does not exists within the space
      modifiers - one or a union of TakeModifiers.
      Returns:
      A matching object, or null if no matching is found within the timeout value.
    • takeIfExists

      public <T> T takeIfExists(T template)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      takeIfExists in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      Returns:
      A removed entry from the space
    • takeIfExists

      public <T> T takeIfExists(T template, long timeout)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.
      Specified by:
      takeIfExists in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      Returns:
      A removed entry from the space
    • takeIfExists

      public <T> T takeIfExists(T template, long timeout, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.
      Specified by:
      takeIfExists in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of TakeModifiers.
      Returns:
      A removed entry from the space
    • takeIfExists

      public <T> T takeIfExists(ISpaceQuery<T> template)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.

      Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.

      Specified by:
      takeIfExists in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      Returns:
      A removed entry from the space
    • takeIfExists

      public <T> T takeIfExists(ISpaceQuery<T> template, long timeout)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.
      Specified by:
      takeIfExists in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      Returns:
      A removed entry from the space
    • takeIfExists

      public <T> T takeIfExists(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.
      Specified by:
      takeIfExists in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.
      modifiers - one or a union of TakeModifiers.
      Returns:
      A removed entry from the space
    • takeMultiple

      public <T> T[] takeMultiple(T template)
      Description copied from interface: GigaSpace
      Takes (removes) all the entries matching the specified template from this space. Same as calling takeMultiple(template, Integer.MAX_VALUE).
      Specified by:
      takeMultiple in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      Returns:
      Removed matched entries from the space
    • takeMultiple

      public <T> T[] takeMultiple(T template, int maxEntries)
      Description copied from interface: GigaSpace
      Takes (removes) all the entries matching the specified template from this space.
      Specified by:
      takeMultiple in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
      Returns:
      Removed matched entries from the space
    • takeMultiple

      public <T> T[] takeMultiple(T template, int maxEntries, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Takes (removes) all the entries matching the specified template from this space.
      Specified by:
      takeMultiple in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
      modifiers - one or a union of TakeModifiers.
      Returns:
      Removed matched entries from the space
    • takeMultiple

      public <T> T[] takeMultiple(ISpaceQuery<T> template)
      Description copied from interface: GigaSpace
      Takes (removes) all the entries matching the specified template from this space.
      Specified by:
      takeMultiple in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      Returns:
      Removed matched entries from the space
    • takeMultiple

      public <T> T[] takeMultiple(ISpaceQuery<T> template, int maxEntries)
      Description copied from interface: GigaSpace
      Takes (removes) all the entries matching the specified template from this space.
      Specified by:
      takeMultiple in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
      Returns:
      Removed matched entries from the space
    • takeMultiple

      public <T> T[] takeMultiple(ISpaceQuery<T> template, int maxEntries, TakeModifiers modifiers)
      Description copied from interface: GigaSpace
      Takes (removes) all the entries matching the specified template from this space.
      Specified by:
      takeMultiple in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
      modifiers - one or a union of TakeModifiers.
      Returns:
      Removed matched entries from the space
    • write

      public <T> LeaseContext<T> write(T entry)
      Description copied from interface: GigaSpace
      Writes a new object to the space, returning its LeaseContext.

      By default uses the WriteModifiers.UPDATE_OR_WRITE modifier (see GigaSpace.write(Object, long, long, WriteModifiers). In order to force the operation to perform "write" only (a bit more performant), the WriteModifiers.WRITE_ONLY modifier can be used resulting in an EntryAlreadyInSpaceException if the entry already exists in the space (it must have an id for this exception to be raised).

      If the object has a primary key that isn't auto - generated, and the modifiers value is one of WriteModifiers.UPDATE_OR_WRITE, WriteModifiers.UPDATE_ONLY or WriteModifiers.PARTIAL_UPDATE, it will call to the update method, returning a LeaseContext holder. This lease is unknown to the grantor, unless an actual 'write' was performed.

      The entry will be written using the default lease this interface is configured with (using the its factory). In order to explicitly define the lease, please use GigaSpace.write(Object, long).

      Specified by:
      write in interface GigaSpace
      Parameters:
      entry - The entry to write to the space
      Returns:
      A usable Lease on a successful write, or null if performed with the proxy configured with NoWriteLease flag.

      when WriteModifiers.UPDATE_OR_WRITE modifier is applied, LeaseContext.getObject() returns null on a successful write or the previous value - on successful update (Only if WriteModifiers.RETURN_PREV_ON_UPDATE is used, otherwise null). UpdateOperationTimeoutException is thrown if timeout occurred while trying to update the object.

    • write

      public <T> LeaseContext<T> write(T entry, long lease)
      Description copied from interface: GigaSpace
      Writes a new object to the space, returning its LeaseContext.

      By default uses the WriteModifiers.UPDATE_OR_WRITE modifier (see GigaSpace.write(Object, long, long, WriteModifiers). In order to force the operation to perform "write" only (a bit more performant), the WriteModifiers.WRITE_ONLY modifier can be used resulting in an EntryAlreadyInSpaceException if the entry already exists in the space (it must have an id for this exception to be raised).

      If the object has a primary key that isn't auto - generated, and the modifiers value is one of WriteModifiers.UPDATE_OR_WRITE, WriteModifiers.UPDATE_ONLY or WriteModifiers.PARTIAL_UPDATE, it will call to the update method, returning a LeaseContext holder. This lease is unknown to the grantor, unless an actual 'write' was performed.

      Specified by:
      write in interface GigaSpace
      Parameters:
      entry - The entry to write to the space
      lease - The lease the entry will be written with, in milliseconds.
      Returns:
      A usable Lease on a successful write, or null if performed with the proxy configured with NoWriteLease flag.

      when WriteModifiers.UPDATE_OR_WRITE modifier is applied, LeaseContext.getObject() returns null on a successful write or the previous value - on successful update (Only if WriteModifiers.RETURN_PREV_ON_UPDATE is used, otherwise null). UpdateOperationTimeoutException is thrown if timeout occurred while trying to update the object.

    • write

      public <T> LeaseContext<T> write(T entry, WriteModifiers modifiers)
      Description copied from interface: GigaSpace
      Writes a new object to the space, returning its LeaseContext.

      By default uses the WriteModifiers.UPDATE_OR_WRITE modifier (see GigaSpace.write(Object, long, long, WriteModifiers). In order to force the operation to perform "write" only (a bit more performant), the WriteModifiers.WRITE_ONLY modifier can be used resulting in an EntryAlreadyInSpaceException if the entry already exists in the space (it must have an id for this exception to be raised).

      If the object has a primary key that isn't auto - generated, and the modifiers value is one of WriteModifiers.UPDATE_OR_WRITE, WriteModifiers.UPDATE_ONLY or WriteModifiers.PARTIAL_UPDATE, it will call to the update method, returning a LeaseContext holder. This lease is unknown to the grantor, unless an actual 'write' was performed.

      The entry will be written using the default lease this interface is configured with (using the its factory). In order to explicitly define the lease, please use GigaSpace.write(Object, long).

      Specified by:
      write in interface GigaSpace
      Parameters:
      entry - The entry to write to the space
      modifiers - one or a union of WriteModifiers.
      Returns:
      A usable Lease on a successful write, or null if performed with the proxy configured with NoWriteLease flag.

      when WriteModifiers.UPDATE_OR_WRITE modifier is applied, LeaseContext.getObject() returns null on a successful write or the previous value - on successful update (Only if WriteModifiers.RETURN_PREV_ON_UPDATE is used, otherwise null). UpdateOperationTimeoutException is thrown if timeout occurred while trying to update the object.

    • write

      public <T> LeaseContext<T> write(T entry, long lease, long timeout, WriteModifiers modifiers)
      Description copied from interface: GigaSpace
      Writes a new object to the space, returning its LeaseContext.

      By default uses the WriteModifiers.UPDATE_OR_WRITE modifier. In order to force the operation to perform "write" only (a bit more performant), the WriteModifiers.WRITE_ONLY modifier can be used resulting in an EntryAlreadyInSpaceException if the entry already exists in the space (it must have an id for this exception to be raised).

      If the object has a primary key that isn't auto - generated, and the modifiers value is one of WriteModifiers.UPDATE_OR_WRITE, WriteModifiers.UPDATE_ONLY or WriteModifiers.PARTIAL_UPDATE, it will call to the update method, returning a LeaseContext holder. This lease is unknown to the grantor, unless an actual 'write' was performed.

      Specified by:
      write in interface GigaSpace
      Parameters:
      entry - The entry to write to the space
      lease - The lease the entry will be written with, in milliseconds.
      timeout - The timeout of an update operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      modifiers - one or a union of WriteModifiers.
      Returns:
      A usable Lease on a successful write, or null if performed with the proxy configured with NoWriteLease flag.

      when WriteModifiers.UPDATE_OR_WRITE modifier is applied, LeaseContext.getObject() returns null on a successful write or the previous value - on successful update (Only if WriteModifiers.RETURN_PREV_ON_UPDATE is used, otherwise null). UpdateOperationTimeoutException is thrown if timeout occurred while trying to update the object.

    • writeMultiple

      public <T> LeaseContext<T>[] writeMultiple(T[] entries)
      Description copied from interface: GigaSpace
      Writes the specified entries to this space.

      The entry will be written using the default lease this interface is configured with (using the its factory). In order to explicitly define the lease, please use GigaSpace.writeMultiple(Object[], long).

      Specified by:
      writeMultiple in interface GigaSpace
      Parameters:
      entries - The entries to write to the space.
      Returns:
      Leases for the written entries
    • writeMultiple

      public <T> LeaseContext<T>[] writeMultiple(T[] entries, long lease)
      Description copied from interface: GigaSpace
      Writes the specified entries to this space.
      Specified by:
      writeMultiple in interface GigaSpace
      Parameters:
      entries - The entries to write to the space.
      lease - The lease the entry will be written with, in milliseconds.
      Returns:
      Leases for the written entries
    • writeMultiple

      public <T> LeaseContext<T>[] writeMultiple(T[] entries, WriteModifiers modifiers)
      Description copied from interface: GigaSpace
      Writes the specified entries to this space.
      Specified by:
      writeMultiple in interface GigaSpace
      Parameters:
      entries - The entries to write to the space.
      modifiers - one or a union of WriteModifiers.
      Returns:
      Leases for the written entries
    • writeMultiple

      public <T> LeaseContext<T>[] writeMultiple(T[] entries, long lease, WriteModifiers modifiers)
      Description copied from interface: GigaSpace
      Writes the specified entries to this space.

      Same as a single write but for a group of entities sharing the same transaction (if any), applied with the same specified operation modifier. The semantics of a single write and a batch update are similar - the return value for each corresponds to it's cell in the returned array. see 'returns' for possible return values.

      Specified by:
      writeMultiple in interface GigaSpace
      Parameters:
      entries - the entries to write.
      lease - the requested lease time, in milliseconds
      modifiers - one or a union of WriteModifiers.
      Returns:
      array in which each cell is corresponding to the written entry at the same index in the entries array, each cell is a usable Lease on a successful write, or null if performed with NoWriteLease attribute.

      when WriteModifiers.UPDATE_OR_WRITE modifier is applied,

    • writeMultiple

      public <T> LeaseContext<T>[] writeMultiple(T[] entries, long lease, long timeout, WriteModifiers modifiers)
      Description copied from interface: GigaSpace
      Writes the specified entries to this space.

      Same as a single write but for a group of entities sharing the same transaction (if any), applied with the same specified operation modifier. The semantics of a single write and a batch update are similar - the return value for each corresponds to it's cell in the returned array. see 'returns' for possible return values.

      Specified by:
      writeMultiple in interface GigaSpace
      Parameters:
      entries - the entries to write.
      lease - the requested lease time, in milliseconds
      timeout - The timeout of the update operations, in milliseconds. If entries are locked by another transaction
      modifiers - one or a union of WriteModifiers.
      Returns:
      array in which each cell is corresponding to the written entry at the same index in the entries array, each cell is a usable Lease on a successful write, or null if performed with NoWriteLease attribute.

      when WriteModifiers.UPDATE_OR_WRITE modifier is applied,

    • writeMultiple

      public <T> LeaseContext<T>[] writeMultiple(T[] entries, long[] leases, WriteModifiers modifiers)
      Description copied from interface: GigaSpace
      Writes the specified entries to this space.

      Same as a single write but for a group of entities sharing the same transaction (if any), applied with the same specified operation modifier. The semantics of a single write and a batch update are similar - the return value for each corresponds to it's cell in the returned array. see 'returns' for possible return values.

      Specified by:
      writeMultiple in interface GigaSpace
      Parameters:
      entries - the entries to write.
      leases - the requested lease time per entry, in milliseconds
      modifiers - one or a union of WriteModifiers.
      Returns:
      array in which each cell is corresponding to the written entry at the same index in the entries array, each cell is a usable Lease on a successful write, or null if performed with NoWriteLease attribute.

      when WriteModifiers.UPDATE_OR_WRITE modifier is applied,

    • writeMultiple

      public <T> LeaseContext<T>[] writeMultiple(T[] entries, long[] leases, long timeout, WriteModifiers modifiers)
      Description copied from interface: GigaSpace
      Writes the specified entries to this space.

      Same as a single write but for a group of entities sharing the same transaction (if any), applied with the same specified operation modifier. The semantics of a single write and a batch update are similar - the return value for each corresponds to it's cell in the returned array. see 'returns' for possible return values.

      Specified by:
      writeMultiple in interface GigaSpace
      Parameters:
      entries - the entries to write.
      leases - the requested lease time per entry, in milliseconds
      timeout - The timeout of the update operations, in milliseconds. If entries are locked by another transaction
      modifiers - one or a union of WriteModifiers.
      Returns:
      array in which each cell is corresponding to the written entry at the same index in the entries array, each cell is a usable Lease on a successful write, or null if performed with NoWriteLease attribute.

      when WriteModifiers.UPDATE_OR_WRITE modifier is applied,

    • iterator

      public <T> SpaceIterator<T> iterator(T template)
      Description copied from interface: GigaSpace
      Returns an iterator over the entries in the space which match the specified template.
      Specified by:
      iterator in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      Returns:
      An iterator over the entries which match the template.
    • iterator

      public <T> SpaceIterator<T> iterator(T template, int batchSize)
      Description copied from interface: GigaSpace
      Returns an iterator over the entries in the space which match the specified template.
      Specified by:
      iterator in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      batchSize - Maximum number of entries to fetch on each batch.
      Returns:
      An iterator over the entries which match the template.
    • iterator

      public <T> SpaceIterator<T> iterator(T template, int batchSize, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Returns an iterator over the entries in the space which match the specified template.
      Specified by:
      iterator in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      batchSize - Maximum number of entries to fetch on each batch.
      modifiers - one or a union of ReadModifiers.
      Returns:
      An iterator over the entries which match the template.
    • iterator

      public <T> SpaceIterator<T> iterator(T template, SpaceIteratorConfiguration spaceIteratorConfiguration)
      Description copied from interface: GigaSpace
      Returns an iterator over the entries in the space which match the specified template.
      Specified by:
      iterator in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      spaceIteratorConfiguration - SpaceIteratorConfiguration.
      Returns:
      An iterator over the entries which match the template.
    • iterator

      public <T> SpaceIterator<T> iterator(ISpaceQuery<T> template)
      Description copied from interface: GigaSpace
      Returns an iterator over the entries in the space which match the specified template.
      Specified by:
      iterator in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      Returns:
      An iterator over the entries which match the template.
    • iterator

      public <T> SpaceIterator<T> iterator(ISpaceQuery<T> template, int batchSize)
      Description copied from interface: GigaSpace
      Returns an iterator over the entries in the space which match the specified template.
      Specified by:
      iterator in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      batchSize - Maximum number of entries to fetch on each batch.
      Returns:
      An iterator over the entries which match the template.
    • iterator

      public <T> SpaceIterator<T> iterator(ISpaceQuery<T> template, int batchSize, ReadModifiers modifiers)
      Description copied from interface: GigaSpace
      Returns an iterator over the entries in the space which match the specified template.
      Specified by:
      iterator in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      batchSize - Maximum number of entries to fetch on each batch.
      modifiers - one or a union of ReadModifiers.
      Returns:
      An iterator over the entries which match the template.
    • iterator

      public <T> SpaceIterator<T> iterator(ISpaceQuery<T> template, SpaceIteratorConfiguration spaceIteratorConfiguration)
      Description copied from interface: GigaSpace
      Returns an iterator over the entries in the space which match the specified template.
      Specified by:
      iterator in interface GigaSpace
      Parameters:
      template - A query to be executed against the space. Most common one is SQLQuery.
      spaceIteratorConfiguration - SpaceIteratorConfiguration.
      Returns:
      An iterator over the entries which match the template.
    • execute

      public <T extends Serializable> AsyncFuture<T> execute(Task<T> task)
      Description copied from interface: GigaSpace
      Executes a task on a specific space node. The space node it will execute on should be controlled by having a method that return the routing value annotated with SpaceRouting.

      In order to control the routing externally, use GigaSpace.execute(org.openspaces.core.executor.Task, Object).

      The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

      Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

      Specified by:
      execute in interface GigaSpace
      Parameters:
      task - The task to execute
      Returns:
      a Future representing pending completion of the task, and whose get() method will return the task value upon completion.
    • execute

      public <T extends Serializable> AsyncFuture<T> execute(Task<T> task, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Executes a task on a specific space node. The space node it will execute on should be controlled by having a method that return the routing value annotated with SpaceRouting.

      In order to control the routing externally, use GigaSpace.execute(org.openspaces.core.executor.Task, Object).

      The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

      Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

      Specified by:
      execute in interface GigaSpace
      Parameters:
      task - The task to execute
      listener - A listener to be notified when execution completes
      Returns:
      a Future representing pending completion of the task, and whose get() method will return the task value upon completion.
    • execute

      public <T extends Serializable> AsyncFuture<T> execute(Task<T> task, Object routing)
      Description copied from interface: GigaSpace
      Executes a task on a specific space node. The space node it will execute on should is controlled by the routing value provided as a second parameter.

      The routing object itself does not have to be the actual routing value, but can be a POJO that defined a method annotated with @SpaceRouting annotation (this works well when wanting to use entries as the routing parameters).

      In order to control the using the Task itself, use GigaSpace.execute(org.openspaces.core.executor.Task).

      The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

      Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

      Specified by:
      execute in interface GigaSpace
      Parameters:
      task - The task to execute
      routing - The routing value that will control on which node the task will be executed on
      Returns:
      a Future representing pending completion of the task, and whose get() method will return the task value upon completion.
    • execute

      public <T extends Serializable> AsyncFuture<T> execute(Task<T> task, Object routing, AsyncFutureListener<T> listener)
      Description copied from interface: GigaSpace
      Executes a task on a specific space node. The space node it will execute on should is controlled by the routing value provided as a second parameter.

      The routing object itself does not have to be the actual routing value, but can be a POJO that defined a method annotated with @SpaceRouting annotation (this works well when wanting to use entries as the routing parameters).

      In order to control the using the Task itself, use GigaSpace.execute(org.openspaces.core.executor.Task).

      The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

      Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

      Specified by:
      execute in interface GigaSpace
      Parameters:
      task - The task to execute
      routing - The routing value that will control on which node the task will be executed on
      listener - A listener to be notified when execution completes
      Returns:
      a Future representing pending completion of the task, and whose get() method will return the task value upon completion.
    • execute

      public <T extends Serializable, R> AsyncFuture<R> execute(DistributedTask<T,R> task, Object... routing)
      Description copied from interface: GigaSpace
      Executes a task on all the nodes that correspond to the list of routing values. The task is executed on each space node with all the results reduced by the AsyncResultsReducer.reduce(java.util.List) operation.

      The routing object itself does not have to be the actual routing value, but can be a POJO that defined a method annotated with @SpaceRouting annotation (this works well when wanting to use entries as the routing parameters).

      The task can optionally implement AsyncResultFilter that can control if tasks should continue to accumulate or it should break and execute the reduce operation on the results received so far.

      The future actual result will be the reduced result of the execution, or the exception thrown during during the reduce operation. The moderator can be used as a mechanism to listen for results as they arrive.

      The last parameter can be of type AsyncFutureListener which, this case, it will be used to register a listener to be notified of the result.

      The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

      Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

      Specified by:
      execute in interface GigaSpace
      Parameters:
      task - The task to execute
      routing - A list of routing values, each resulting in an execution of the task on the space node it corresponds to
      Returns:
      a Future representing pending completion of the task, and whose get() method will return the task value upon completion.
    • execute

      public <T extends Serializable, R> AsyncFuture<R> execute(DistributedTask<T,R> task)
      Description copied from interface: GigaSpace
      Executes the task on all the primary space nodes within the cluster (broadcast). The task is executed on each space node with all the results reduced by the AsyncResultsReducer.reduce(java.util.List) operation.

      The task can optionally implement AsyncResultFilter that can control if tasks should continue to accumulate or it should break and execute the reduce operation on the results received so far.

      The future actual result will be the reduced result of the execution, or the exception thrown during during the reduce operation. The moderator can be used as a mechanism to listen for results as they arrive.

      The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

      Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

      Specified by:
      execute in interface GigaSpace
      Parameters:
      task - The task to execute
      Returns:
      a Future representing pending completion of the task, and whose get() method will return the task value upon completion.
    • executorBuilder

      public <T extends Serializable, R> ExecutorBuilder<T,R> executorBuilder(AsyncResultsReducer<T,R> reducer)
      Description copied from interface: GigaSpace
      Constructs an executor builder allowing to accumulate different tasks required to be executed into a single execute mechanism with all the results reduced by the reducer provided.

      The reducer can optionally implement AsyncResultFilter that can control if tasks should continue to accumulate or it should break and execute the reduce operation on the results received so far.

      The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

      Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

      Specified by:
      executorBuilder in interface GigaSpace
      Parameters:
      reducer - The reducer to reduce the results of all the different tasks added.
      Returns:
      The executor builder.
    • getTypeManager

      public GigaSpaceTypeManager getTypeManager()
      Description copied from interface: GigaSpace
      Gets the type manager of this GigaSpace instance.
      Specified by:
      getTypeManager in interface GigaSpace
      See Also:
    • aggregate

      public <T> AggregationResult aggregate(ISpaceQuery<T> query, AggregationSet aggregationSet)
      Description copied from interface: GigaSpace
      Executes the specified query along with the specified aggregations collocated at the space.
      Specified by:
      aggregate in interface GigaSpace
      Parameters:
      query - Query to search by
      aggregationSet - aggregations to execute
      Returns:
      Aggregations result
      See Also:
    • aggregate

      public <T> AggregationResult aggregate(ISpaceQuery<T> query, AggregationSet aggregationSet, ReadModifiers readModifiers)
      Specified by:
      aggregate in interface GigaSpace
    • freshCopy

      protected static AggregationSet freshCopy(AggregationSet aggregationSet)
      A copy of the aggregation set for one attempt.

      Aggregators are stateful on the client: each partition's intermediate result is reduced into the caller's aggregator instances as it arrives. When an attempt fails part-way - one partition answered, another could not be reached - those instances already hold the partial sum, and the retry on another cluster would add its full answer on top: a count of 45 for 30 entries, returned as a success. A copy per attempt starts every attempt clean, and leaves the caller's set untouched for reuse. Cloned the way the space proxy copies an aggregate request.

    • change

      public <T> ChangeResult<T> change(ISpaceQuery<T> query, ChangeSet changeSet)
      Description copied from interface: GigaSpace
      Changes existing objects in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      change in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      Returns:
      A ChangeResult containing the details of the change operation affect.
      See Also:
    • change

      public <T> ChangeResult<T> change(ISpaceQuery<T> query, ChangeSet changeSet, long timeout)
      Description copied from interface: GigaSpace
      Changes existing objects in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      change in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      Returns:
      A ChangeResult containing the details of the change operation affect.
      See Also:
    • change

      public <T> ChangeResult<T> change(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers)
      Description copied from interface: GigaSpace
      Changes existing objects in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      change in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      Returns:
      A ChangeResult containing the details of the change operation affect.
      See Also:
    • change

      public <T> ChangeResult<T> change(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout)
      Description copied from interface: GigaSpace
      Changes existing objects in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      change in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      Returns:
      A ChangeResult containing the details of the change operation affect.
      See Also:
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
      See Also:
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, AsyncFutureListener<ChangeResult<T>> listener)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      listener - A listener to be notified when a result arrives.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
      See Also:
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, long timeout)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
      See Also:
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, long timeout, AsyncFutureListener<ChangeResult<T>> listener)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      listener - A listener to be notified when a result arrives.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
      See Also:
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers)
      Description copied from interface: GigaSpace
      Changes an existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
      See Also:
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, AsyncFutureListener<ChangeResult<T>> listener)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      listener - A listener to be notified when a result arrives.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
      See Also:
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
      See Also:
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout, AsyncFutureListener<ChangeResult<T>> listener)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      query - Query to search by.
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      listener - A listener to be notified when a result arrives.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
      See Also:
    • change

      public <T> ChangeResult<T> change(T template, ChangeSet changeSet)
      Description copied from interface: GigaSpace
      Changes existing objects in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      change in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      Returns:
      A ChangeResult containing the details of the change operation affect.
    • change

      public <T> ChangeResult<T> change(T template, ChangeSet changeSet, long timeout)
      Description copied from interface: GigaSpace
      Changes existing objects in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      change in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      Returns:
      A ChangeResult containing the details of the change operation affect.
    • change

      public <T> ChangeResult<T> change(T template, ChangeSet changeSet, ChangeModifiers modifiers)
      Description copied from interface: GigaSpace
      Changes existing objects in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      change in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      Returns:
      A ChangeResult containing the details of the change operation affect.
    • change

      public <T> ChangeResult<T> change(T template, ChangeSet changeSet, ChangeModifiers modifiers, long timeout)
      Description copied from interface: GigaSpace
      Changes existing objects in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      change in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      Returns:
      A ChangeResult containing the details of the change operation affect.
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(T template, ChangeSet changeSet)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(T template, ChangeSet changeSet, AsyncFutureListener<ChangeResult<T>> listener)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      listener - A listener to be notified when a result arrives.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(T template, ChangeSet changeSet, long timeout)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(T template, ChangeSet changeSet, long timeout, AsyncFutureListener<ChangeResult<T>> listener)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      listener - A listener to be notified when a result arrives.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(T template, ChangeSet changeSet, ChangeModifiers modifiers)
      Description copied from interface: GigaSpace
      Changes an existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(T template, ChangeSet changeSet, ChangeModifiers modifiers, AsyncFutureListener<ChangeResult<T>> listener)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      listener - A listener to be notified when a result arrives.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(T template, ChangeSet changeSet, ChangeModifiers modifiers, long timeout)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
    • asyncChange

      public <T> Future<ChangeResult<T>> asyncChange(T template, ChangeSet changeSet, ChangeModifiers modifiers, long timeout, AsyncFutureListener<ChangeResult<T>> listener)
      Description copied from interface: GigaSpace
      Changes existing objects in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

      Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

      Specified by:
      asyncChange in interface GigaSpace
      Parameters:
      template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
      changeSet - Changes to apply to the matched entry.
      modifiers - one or a union of ChangeModifiers
      timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
      listener - A listener to be notified when a result arrives.
      Returns:
      A future containing the details of the change operation affect which arrived asynchronously.
    • newDataEventSession

      public DataEventSession newDataEventSession()
      Description copied from interface: GigaSpace
      Creates a new DataEventSession with the default configuration.
      Specified by:
      newDataEventSession in interface GigaSpace
      Returns:
      a new data event session.
    • newDataEventSession

      public DataEventSession newDataEventSession(EventSessionConfig config)
      Description copied from interface: GigaSpace
      Creates a new DataEventSession with the specified configuration.
      Specified by:
      newDataEventSession in interface GigaSpace
      Parameters:
      config - The configuration settings for the new data event session.
      Returns:
      a new data event session.
    • setQuiesceToken

      public void setQuiesceToken(QuiesceToken token)
      Specified by:
      setQuiesceToken in interface GigaSpace
    • setMVCCGenerationsState

      public void setMVCCGenerationsState(MVCCGenerationsState generationsState)
      Specified by:
      setMVCCGenerationsState in interface GigaSpace
    • prepareTemplate

      public <T> ISpaceQuery<T> prepareTemplate(Object template)
      Description copied from interface: GigaSpace
      Translates the template object into pre-processed packet which will be sent to the space. The process of serializing an entry for transmission to the space will be identical if the same entry is used twice. The prepareTemplate method gives a way to reduce the impact of repeated use of the same entry therefore it is extremely useful when dealing with many template matching operations (i.e read and take). This method will not access the space, all processing is done in client side only.
      Specified by:
      prepareTemplate in interface GigaSpace
      Parameters:
      template - to be translated into ISpaceQuery
      Returns:
      pre-processed ISpaceQuery which represents the translated template
      See Also:
    • asyncLoad

      public AsyncFuture<SpaceDataSourceLoadResult> asyncLoad(SpaceDataSourceLoadRequest spaceDataSourceLoadRequest)
      Description copied from interface: GigaSpace
      Loads data from a SpaceDataSource on demand The Space data source is created with SpaceDataSourceFactory Loaded data can be adapted using the SpaceTypeSchemaAdapter
      Specified by:
      asyncLoad in interface GigaSpace
      Parameters:
      spaceDataSourceLoadRequest - SpaceDataSourceLoadRequest
      Returns:
      A future containing the details of the load operation affect which arrived * asynchronously.
    • registerDurableTask

      public <T extends Serializable, R> UUID registerDurableTask(DurableTask<T,R> eventTask)
      Specified by:
      registerDurableTask in interface GigaSpace
    • executeDurable

      public AsyncFuture executeDurable(UUID uuid)
      Specified by:
      executeDurable in interface GigaSpace
    • executeDurable

      public AsyncFuture executeDurable(UUID uuid, Object context)
      Specified by:
      executeDurable in interface GigaSpace
    • listDurableTasks

      public Set<DurableTaskInfo> listDurableTasks()
      Specified by:
      listDurableTasks in interface GigaSpace
    • unregisterDurableTask

      public AsyncFuture<Boolean> unregisterDurableTask(UUID id)
      Specified by:
      unregisterDurableTask in interface GigaSpace
    • getActiveOperations

      public List<OperationRecord> getActiveOperations()
      Description copied from interface: GigaSpace
      Returns all currently active (in-flight) operations on the space instance backing this proxy. Tracking is performed server-side by OperationTrackingFilter and covers every client hitting that instance, not just this proxy. Enabled together with LRMI network activity monitoring for the space instance.
      Specified by:
      getActiveOperations in interface GigaSpace
    • getLastOperations

      public List<OperationRecord> getLastOperations()
      Description copied from interface: GigaSpace
      Returns the last completed operations on the space instance backing this proxy (up to configured max). Tracking is performed server-side by OperationTrackingFilter and covers every client hitting that instance, not just this proxy. Enabled together with LRMI network activity monitoring for the space instance.
      Specified by:
      getLastOperations in interface GigaSpace
    • getLastOperations

      public List<OperationRecord> getLastOperations(int limit)
      Description copied from interface: GigaSpace
      Returns the last completed operations on the space instance backing this proxy, up to the given limit. Tracking is performed server-side by OperationTrackingFilter and covers every client hitting that instance, not just this proxy. Enabled together with LRMI network activity monitoring for the space instance.
      Specified by:
      getLastOperations in interface GigaSpace
      Parameters:
      limit - max number of records to return
    • getStats

      public MultiClusterStats getStats()
      Per-cluster operation counters, failures and observed latency.
      Specified by:
      getStats in interface MultiClusterGigaSpace
    • close

      public void close()
      Releases the write executors and the deferred-mutation queue. The cluster proxies are not touched - they belong to whoever registered them. Idempotent.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface MultiClusterGigaSpace
    • toString

      public String toString()
      Overrides:
      toString in class Object