Map-JCache

  Search Here
Searching GigaSpaces XAP/EDG 6.0 Documentation

                                               

Section Summary: GigaSpaces provides a Map/JCache interface, which allows applications to write to a space/cache using the Map APIs – put(), get(), remove(), transaction() – or the richer JCache specification.

This page is specific to:
GigaSpaces 6.0

If you're interested in another version, click it below:
GigaSpaces 5.x
GigaSpaces 6.5

Overview

GigaSpaces allows applications to interact with the space using the Map API (JCache). Accessing the space via the Map API can be done using the com.j_spaces.javax.cache.Cache or via the com.j_spaces.map.IMap interfaces.

The com.j_spaces.map.IMap is extension of the com.j_spaces.javax.cache.Cache interface and includes enhanced options such as transaction support, timeout operations (blocking read) and versioning.

Map API vs. JavaSpaces API

Expand this...

CacheFinder: Cache Instance Factory & Connection Method

Use the gsInstance command to start a remote space or the com.j_spaces.map.CacheFinder.find to start an embedded space.

The com.j_spaces.map.CacheFinder is a factory class that generates space/cache proxies or start a space within the application process (embedded mode). It includes static methods that return the desired space/cache proxy. When running the space within the application process you can determine the space cluster topology (replicated , partitioned) using the Space URL that is provided as an argument to CacheFinder methods.

CacheFinder Methods

Expand this...

com.j_spaces.map.IMap: the Map Interface

The IMap interface (com.j_spaces.map.IMap; see Javadoc) is the returned object from the CacheFinder.find() method. Based on the URL provided and the configuration, the returned IMap object can encapsulate access to a remote space/cache, embedded space/cache, replicated cache, or partitioned cache.

The IMap interface exposes the familiar Map APIs put(), get(), and remove(); the setTransaction() method is used to encapsulate Map operations in a transaction (see Map Transactions).

com.j_spaces.javax.cache.Cache: JCache Interface

Expand this...

RDBMS Read-Through and Write-Through

Expand this...

Section Contents

  • Map ExceptionsThe two main exceptions thrown for cache problems: EntryVersionConflictException and CacheTimeoutException.
  • Map IteratorUsed to get objects matching multiple templates in one call.
  • Map NotificationsHow to register to be notified when objects are put to or removed from the space/cache.
  • Map Optimistic LockingHow to you write applications under the assumption that put operations may fail, if the updated object is changed by someone else since it was read.
  • Map Pessimistic LockingHow to explicitly prevent multiple users from from performing get, put or remove operations with the same key under a transaction.
  • Map TransactionsPerforming distributed and 'local' transactions on space/cache instances.
  • Writing Your First Map API ApplicationEnvironment setup and writing a Map hello world application.


GigaSpaces 6.0 Documentation Contents (Current Page in Bold)

    Java

    C++

    .NET

    Middleware Capabilities

    Configuration and Management

Add GigaSpaces wiki search to your browser search engines!
(works on Firefox 2 and Internet Explorer 7)

Labels

 
(None)