Package de.bamberg.ha.api.cluster

Examples of de.bamberg.ha.api.cluster.ClusterKey


    String generatorName=entity.getClass().getName();
    String idAsString = generateNewId(generatorName);
   
    clusterEntityProcessor.setID(entity, idAsString);
   
    ClusterKey key=new ClusterKey(entity.getClass(),idAsString);
    map.put(key, entity);
    return entity;
   
  }
View Full Code Here


   * @see de.bamberg.ha.cluster.ClusterManager#get(java.lang.String, java.lang.Class)
   */
  @Override
  public Object get(String id,Class entityClass) {
    String name=entityClass.getName();
    ClusterKey key=new ClusterKey(entityClass,id);
    Object entity=Hazelcast.getMap(name).get(key);
    if (entity instanceof ClusterKey) {
      entity=null;
    }
    return entity;
View Full Code Here

   */
  @Override
  public void remove(Object entity) {
    String name=entity.getClass().getName();
    Object id=clusterEntityProcessor.getID(entity);
    ClusterKey key=new ClusterKey(entity.getClass(),id.toString() );
    Hazelcast.getMap(name).remove(key);
  }
View Full Code Here

TOP

Related Classes of de.bamberg.ha.api.cluster.ClusterKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.