for distributed concurrency control l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Hazelcast PowerPoint Presentation
Download Presentation
Hazelcast

Loading in 2 Seconds...

  share
play fullscreen
1 / 8
juro

Hazelcast - PowerPoint PPT Presentation

331 Views
Download Presentation
Hazelcast
An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. For distributed concurrency control Hazelcast

  2. Hazelcast is a data distribution platform for Java. Talip Ozturk www.hazelcast.com

  3. Concurrent Map import java.util.Map;  import java.util.concurrent.ConcurrentHashMap; Map users = new ConcurrentHashMap(); users.put("admin", new AdminUser("admin", "acc355")); users.put("fred", new ClientUser("fred", "password"));

  4. Distributed Map import java.util.Map; import com.hazelcast.core.Hazelcast; Map users = Hazelcast.getMap("users"); users.put("admin", new AdminUser("admin", "acc355")); users.put("fred", new ClientUser("fred", "password"));

  5. Distributed Lock import java.util.concurrent.locks.Lock; import com.hazelcast.core.Hazelcast; Lock lock = Hazelcast.getLock(currentUser); lock.lock(); try {    currentUser.setDisplayName("...");     currentUser.save(); } finally {    lock.unlock(); }

  6. Executor Framework public class HelperTask implements Callable<String> {     public String call() {         // Do things         return someString;    }} ExecutorService e = Hazelcast.getExecutorService(); Future<String> task = e.submit(new HelperTask()); String result = task.get();

  7. Talip Ozturk - Hazelcast Twitter @oztalip www.hazelcast.com Questions? Sean Hodges Twitter @seanhodges seanhodges84@gmail.com