Hazelcast Store

The Hazelcast EntityStore is a non-persistent EntityStore leveraging the Hazelcast in-memory data grid. It can be used when you need a large in-memory Store with high throughput.

The only thing needed to use the Hazelcast EntityStore, is to do the proper assembly in a module. We recommend the usage of the HazelcastEntityStoreAssembler which will add the service to the module.

Example

public static void main( String args )
{
   qi4j = new SingletonAssembler()
   {
       public void assemble( ModuleAssembly module )
           throws AssemblyException
       {
           Visibility vis = Visibility.module;
           new HazelcastEntityStoreAssembler( vis ).assemble( module );

           module.addEntities( ....
             :
             :
       }
   }.runtime();
}

Once a qi4j Application using the Hazelcast EntityStore is started, the default Hazelcast instances discovery
mechanism (multicast) is used. You can for example start Hazelcast nodes in other JVMs :
public static void main( String args )
{
   HazelcastInstance h1 = Hazelcast.newHazelcastInstance(null);
}
This allows you to store more than what a single JVM process can allocate in a single EntityStore.
Plus, you can start multiple instances per JVM.

Qi4j and the Qi4j logo are trademarks of Richard Öberg, Niclas Hedhman and the members of the Qi4j Core Team. See Qi4j licensing for more information.
Powered by SiteVisionexternal link.