This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public static void main(String[] args) { | |
| Config config = new Config(); | |
| MapConfig mapConfig = config.getMapConfig("map"); | |
| MapStoreConfig mapStoreConfig = new MapStoreConfig(); | |
| mapStoreConfig.setEnabled(true).setWriteDelaySeconds(60).setImplementation(new MyStore()); | |
| mapConfig.setMapStoreConfig(mapStoreConfig); | |
| HazelcastInstance instance = Hazelcast.newHazelcastInstance(config); | |
| IMap<Object, Object> map = instance.getMap("map"); | |
| for (int i = 0; i < 10; i++) { | |
| map.put(i, -1); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public static void main(String[] args) { | |
| HazelcastInstance instance1 = Hazelcast.newHazelcastInstance(); | |
| HazelcastInstance instance2 = Hazelcast.newHazelcastInstance(); | |
| HazelcastInstance instance3 = Hazelcast.newHazelcastInstance(); | |
| HazelcastInstance instance4 = Hazelcast.newHazelcastInstance(); | |
| IExecutorService exec = instance1.getExecutorService("exec"); | |
| exec.submitToAllMembers(new MyCallable()); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import com.hazelcast.config.Config; | |
| import com.hazelcast.config.InMemoryFormat; | |
| import com.hazelcast.config.MapConfig; | |
| import com.hazelcast.config.MapStoreConfig; | |
| import com.hazelcast.core.Hazelcast; | |
| import com.hazelcast.core.HazelcastInstance; | |
| import com.hazelcast.core.IMap; | |
| import com.hazelcast.core.MapLoader; | |
| import java.util.ArrayList; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import com.hazelcast.config.Config; | |
| import com.hazelcast.config.EvictionPolicy; | |
| import com.hazelcast.config.InMemoryFormat; | |
| import com.hazelcast.config.MapConfig; | |
| import com.hazelcast.config.MaxSizeConfig; | |
| import com.hazelcast.core.EntryEvent; | |
| import com.hazelcast.core.Hazelcast; | |
| import com.hazelcast.core.HazelcastInstance; | |
| import com.hazelcast.core.IMap; | |
| import com.hazelcast.core.MapEvent; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Config config = new Config(); | |
| QueueConfig queueConfig = config.getQueueConfig("queue"); | |
| queueConfig.setEmptyQueueTtl(5); | |
| HazelcastInstance instance = Hazelcast.newHazelcastInstance(config); | |
| IQueue<Object> queue = instance.getQueue("queue"); | |
| int size = instance.getDistributedObjects().size(); | |
| System.err.println("Size [" + size + "] should be 1"); | |
| queue.offer("item"); | |
| queue.poll(); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* | |
| * Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* | |
| * Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* | |
| * Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package compile; | |
| import com.hazelcast.config.Config; | |
| import com.hazelcast.core.EntryAdapter; | |
| import com.hazelcast.core.EntryEvent; | |
| import com.hazelcast.core.EntryListener; | |
| import com.hazelcast.core.Hazelcast; | |
| import com.hazelcast.core.HazelcastInstance; | |
| import com.hazelcast.core.IMap; | |
| import com.hazelcast.core.MapEvent; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class GurbuzTest { | |
| public static void main(String[] args) { | |
| Config config = new Config(); | |
| MapConfig mapConfig = new MapConfig(); | |
| mapConfig.setName("query.archive.*"); | |
| MapStoreConfig mapStoreConfig = new MapStoreConfig(); | |
| mapStoreConfig.setEnabled(true).setFactoryImplementation(new MyFac()); | |
| mapConfig.setMapStoreConfig(mapStoreConfig); | |
| config.addMapConfig(mapConfig); | |
| HazelcastInstance instance = Hazelcast.newHazelcastInstance(config); |