Summary: This page describes how EDS implementations prior to GigaSpaces version 9.5 should migrate to the new Space Persistency APIs.
OverviewExternal Data Source API contains 5 interfaces the implementation can use:
These interfaces have been replaced with two new classes which can be extended: SpaceDataSource
SpaceSynchronizationEndpoint
Migrating From EDS APIs to Space Persistency APIsOne of the advantages the SpaceDataSource and SpaceSynchronizationEndpoint is the fact that it defines a single API for the purpose of persistency so instead of implementing many interfaces, one should extend only the the classes and methods which matches the requested functionality. The following table lists the EDS interfaces methods replaced by the new Space Persistency classes:
When using EDS API, BulkDataPersister.executeBulk might be invoked on two occasions:
On transaction execution, getting the transaction metadata was done using the BulkDataPersisterContext.getCurrentContext method. This is no longer needed because on transaction execution, the SpaceSynchronizationEndpoint.onTransactionSynchronization method is invoked and receives the transaction data as a parameter. Configuration ChangesWhen using Space Persistency - the same space properties used to configure the EDS can be used with two exceptions:
Built In Hibernate ImplementationGigaSpaces provides a built in Hibernate EDS implementation. This implementation has been adjusted to work with the new Space Persistency APIs. Therefore, two new Hibernate implementation classes were created: DefaultHibernateSpaceDataSource and DefaultHibernateSpaceSynchronizationEndpoint. The following example shows how to configure a space with a Hibernate SpaceDataSource and a Mirror service with a Hibernate SpaceSynchronizationEndpoint: <!-- SPACE --> <bean id="hibernateSpaceDataSource" class="org.openspaces.persistency.hibernate.DefaultHibernateSpaceDataSourceFactoryBean"> <property name="sessionFactory" ref="sessionFactory"/> <property name="initialLoadChunkSize" value="2000"/> </bean> <os-core:space id="space" url="/./space" schema="persistent" mirror="true" space-data-source="hibernateSpaceDataSource"> <os-core:properties> <props> <prop key="cluster-config.cache-loader.external-data-source">true</prop> <prop key="cluster-config.cache-loader.central-data-source">true</prop> </props> </os-core:properties> </os-core:space> <!-- MIRROR --> <bean id="hibernateSpaceSynchronizationEndpoint" class="org.openspaces.persistency.hibernate.DefaultHibernateSpaceSynchronizationEndpointFactoryBean"> <property name="sessionFactory" ref="sessionFactory"/> </bean> <os-core:mirror id="mirror" url="/./mirror-service" space-sync-endpoint="hibernateSpaceSynchronizationEndpoint" operation-grouping="group-by-space-transaction"> <os-core:source-space name="mySpace" partitions="2" backups="1"/> </os-core:mirror> |
![]() |
GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence |