@Test public void testSave() { HazelcastInstance hazelcastInstance1 = Hazelcast.newHazelcastInstance(); HazelcastInstance hazelcastInstance2 = Hazelcast.newHazelcastInstance(); System.out.println("save"); HazelcastSessionDataStorage instance = new HazelcastSessionDataStorage(hazelcastInstance1); SessionData sessionData = instance.create(); String sessionId = sessionData.getId(); sessionData.put(KEY, VALUE); instance.save(sessionData); SessionData saved = hazelcastInstance2 .<String, SessionData>getMap(SESSION_NAME) .get(sessionId); assertEquals(sessionData, saved); }
@Override public void save(SessionData sessionData) { this.sessions.put(sessionData.getId(), sessionData); }
HazelcastSessionDataStorage implements SessionDataStorage { @Override public void save(SessionData sessionData) { this.sessions.put(sessionData.getId(), sessionData); } }
HazelcastSessionDataStorage implements SessionDataStorage { @Override public void save(SessionData sessionData) { this.sessions.put(sessionData.getId(), sessionData); } HazelcastSessionDataStorage(HazelcastInstance hazelcastInstance);  HazelcastSessionDataStorage(String name, HazelcastInstance hazelcastInstance);  HazelcastSessionDataStorage(IMap<String, SessionData> sessions); }
HazelcastSessionDataStorage implements SessionDataStorage { @Override public void save(SessionData sessionData) { this.sessions.put(sessionData.getId(), sessionData); } HazelcastSessionDataStorage(HazelcastInstance hazelcastInstance);  HazelcastSessionDataStorage(String name, HazelcastInstance hazelcastInstance);  HazelcastSessionDataStorage(IMap<String, SessionData> sessions); @Override SessionData create(); @Override void save(SessionData sessionData); @Override SessionData get(String sessionId); @Override void delete(String sessionId); }
HazelcastSessionDataStorage implements SessionDataStorage { @Override public void save(SessionData sessionData) { this.sessions.put(sessionData.getId(), sessionData); } HazelcastSessionDataStorage(HazelcastInstance hazelcastInstance);  HazelcastSessionDataStorage(String name, HazelcastInstance hazelcastInstance);  HazelcastSessionDataStorage(IMap<String, SessionData> sessions); @Override SessionData create(); @Override void save(SessionData sessionData); @Override SessionData get(String sessionId); @Override void delete(String sessionId);  }