|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.needle.gigaspaces.datasource.CompassDataSource
public class CompassDataSource
A Compass data source to be used with GigaSpaces mirror.
GigaSpaces mirror allows to mirror changes done to the Space into an external data source in a reliable async manner. The Compass data source allows to mirror changes done to the Space into the search engine using Compass.
This extenal data source can be injected with a Compass instance, or it can be
configured using the extenal data source proeprties configuration to create a Compass instance.
The proeprty compass-config-file will point to Compass configuration file.
| Field Summary | |
|---|---|
static String |
COMPASS_CFG_PROPERTY
|
| Fields inherited from interface com.gigaspaces.datasource.ManagedDataSource |
|---|
DATA_CLASS_PROPS, NUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER |
| Constructor Summary | |
|---|---|
CompassDataSource()
|
|
| Method Summary | |
|---|---|
int |
count(Object template)
Count number of object in the data source that match given template. |
void |
executeBulk(List<com.gigaspaces.datasource.BulkItem> bulkItems)
Execute given bulk of operations. |
void |
init(Properties properties)
|
com.gigaspaces.datasource.DataIterator<Object> |
initialLoad()
Creates and returns an iterator over all the entries that should be loaded into space. |
com.gigaspaces.datasource.DataIterator<Object> |
iterator(Object template)
Create an iterator over all objects that match the given template. |
Object |
read(Object template)
Read one object that matches the given template. |
void |
remove(Object object)
Remove the given object from the data store |
void |
removeBatch(List<Object> objects)
Remove given objects from the data store. |
void |
setCompass(Compass compass)
|
void |
shutdown()
|
void |
update(Object object)
Update the given object in the data store |
void |
updateBatch(List<Object> objects)
Update given objects in the data store. |
void |
write(Object object)
Write given new object to the data store |
void |
writeBatch(List<Object> objects)
Write given new objects to the data store. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMPASS_CFG_PROPERTY
| Constructor Detail |
|---|
public CompassDataSource()
| Method Detail |
|---|
public void setCompass(Compass compass)
public void init(Properties properties)
throws com.gigaspaces.datasource.DataSourceException
init in interface com.gigaspaces.datasource.ManagedDataSource<Object>com.gigaspaces.datasource.DataSourceException
public void shutdown()
throws com.gigaspaces.datasource.DataSourceException
shutdown in interface com.gigaspaces.datasource.ManagedDataSource<Object>com.gigaspaces.datasource.DataSourceException
public void write(Object object)
throws com.gigaspaces.datasource.DataSourceException
write in interface com.gigaspaces.datasource.DataPersister<Object>com.gigaspaces.datasource.DataSourceException
public void update(Object object)
throws com.gigaspaces.datasource.DataSourceException
update in interface com.gigaspaces.datasource.DataPersister<Object>com.gigaspaces.datasource.DataSourceException
public void remove(Object object)
throws com.gigaspaces.datasource.DataSourceException
remove in interface com.gigaspaces.datasource.DataPersister<Object>com.gigaspaces.datasource.DataSourceException
public void writeBatch(List<Object> objects)
throws com.gigaspaces.datasource.DataSourceException
If the implementation uses transactions, all the objects must be written in one transaction.
writeBatch in interface com.gigaspaces.datasource.DataPersister<Object>com.gigaspaces.datasource.DataSourceException
public void updateBatch(List<Object> objects)
throws com.gigaspaces.datasource.DataSourceException
If the implementation uses transactions, all the objects must be updated in one transaction.
* This operation is not currently supported by the space.
com.gigaspaces.datasource.DataSourceException
public void removeBatch(List<Object> objects)
throws com.gigaspaces.datasource.DataSourceException
If the implementation uses transactions, All the objects must be removed in one transaction.
This operation is not currently supported by the space.
com.gigaspaces.datasource.DataSourceException
public void executeBulk(List<com.gigaspaces.datasource.BulkItem> bulkItems)
throws com.gigaspaces.datasource.DataSourceException
BulkItem contains one of
the following operation -
WRITE - given object should be inserted to the data store,
UPDATE - given object should be updated in the data store,
REMOVE - given object should be deleted from the data store
If the implementation uses transactions,
all the bulk operations must be executed in one transaction.
executeBulk in interface com.gigaspaces.datasource.BulkDataPersistercom.gigaspaces.datasource.DataSourceException
public Object read(Object template)
throws com.gigaspaces.datasource.DataSourceException
read in interface com.gigaspaces.datasource.DataProvider<Object>com.gigaspaces.datasource.DataSourceException
public com.gigaspaces.datasource.DataIterator<Object> iterator(Object template)
throws com.gigaspaces.datasource.DataSourceException
iterator in interface com.gigaspaces.datasource.DataProvider<Object>com.gigaspaces.datasource.DataSourceException
public int count(Object template)
throws com.gigaspaces.datasource.DataSourceException
com.gigaspaces.datasource.DataSourceException
public com.gigaspaces.datasource.DataIterator<Object> initialLoad()
throws com.gigaspaces.datasource.DataSourceException
initialLoad in interface com.gigaspaces.datasource.ManagedDataSource<Object>DataIterator or null if no data should be loaded into
space
com.gigaspaces.datasource.DataSourceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||