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 ClientProcessTest { | |
| static { | |
| System.setProperty(GroupProperties.PROP_WAIT_SECONDS_BEFORE_JOIN, "0"); | |
| System.setProperty("java.net.preferIPv4Stack", "true"); | |
| System.setProperty("hazelcast.local.localAddress", "127.0.0.1"); | |
| System.setProperty("hazelcast.version.check.enabled", "false"); | |
| System.setProperty("hazelcast.socket.bind.any", "true"); | |
| Random rand = new Random(); |
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 ClientProcess { | |
| public static void main(String[] args) { | |
| final ClientConfig clientConfig = new ClientConfig(); | |
| clientConfig.setConnectionPoolSize(Integer.valueOf(args[0])); | |
| final HazelcastInstance client = HazelcastClient.newHazelcastClient(clientConfig); | |
| final IMap<Object,Object> map = client.getMap("map"); | |
| final Random random = new Random(System.currentTimeMillis()); | |
| final byte[] bytes = new byte[100]; |
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
| final String mapName = "map"; | |
| final int count = 200000; | |
| boolean nearCache = false; | |
| int threadCount = 1; | |
| final ClientConfig clientConfig = new ClientConfig(); | |
| clientConfig.addAddress("127.0.0.1:5701"); | |
| if (nearCache) { | |
| final NearCacheConfig nearCacheConfig = new NearCacheConfig(); |
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) throws Exception { | |
| final Config config = new Config(); | |
| final MapConfig mapConfig = config.getMapConfig("map"); | |
| final MapStoreConfig mapStoreConfig = new MapStoreConfig(); | |
| mapStoreConfig.setEnabled(true); | |
| mapStoreConfig.setWriteDelaySeconds(3); | |
| final MyMapStore myMapStore = new MyMapStore(); | |
| mapStoreConfig.setImplementation(myMapStore); | |
| mapConfig.setMapStoreConfig(mapStoreConfig); |
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) throws Exception { | |
| final Config config = new Config(); | |
| final MapConfig mapConfig = config.getMapConfig("default"); | |
| mapConfig.setBackupCount(0).setAsyncBackupCount(1).setMaxIdleSeconds(10); | |
| final HazelcastInstance instance1 = Hazelcast.newHazelcastInstance(config); | |
| final HazelcastInstance instance2 = Hazelcast.newHazelcastInstance(config); | |
| final IMap<Object, Object> map = instance1.getMap("default"); | |
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) throws Exception { | |
| final Config config = new Config(); | |
| HazelcastInstance instance1 = Hazelcast.newHazelcastInstance(config); | |
| HazelcastInstance instance2 = Hazelcast.newHazelcastInstance(config); | |
| final IMap<Object, Object> map = instance1.getMap("default"); | |
| final long begin = System.currentTimeMillis(); | |
| map.put("key", "value", 620, TimeUnit.SECONDS); | |
| while (true) { |
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.MapConfig; | |
| import com.hazelcast.config.MapIndexConfig; | |
| import com.hazelcast.config.MapStoreConfig; | |
| import com.hazelcast.core.Hazelcast; | |
| import com.hazelcast.core.HazelcastInstance; | |
| import com.hazelcast.core.IMap; | |
| import com.hazelcast.core.MapStore; | |
| import java.io.Serializable; |
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 yourgroupid; | |
| import com.hazelcast.core.HazelcastInstance; | |
| import com.hazelcast.core.ILock; | |
| import com.hazelcast.core.IQueue; | |
| import com.hazelcast.core.TransactionalQueue; | |
| import com.hazelcast.logging.ILogger; | |
| import com.hazelcast.logging.Logger; | |
| import com.hazelcast.stabilizer.tests.TestContext; |
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 yourgroupid; | |
| import com.hazelcast.core.HazelcastInstance; | |
| import com.hazelcast.core.ILock; | |
| import com.hazelcast.core.IQueue; | |
| import com.hazelcast.core.TransactionalQueue; | |
| import com.hazelcast.logging.ILogger; | |
| import com.hazelcast.logging.Logger; | |
| import com.hazelcast.stabilizer.tests.TestContext; | |
| import com.hazelcast.stabilizer.tests.TestRunner; |
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
| Development Cycle: | |
| By starting today we're switching to a pull-request based development. Instead of pushing directly to main repo (github.com/hazelcast/hazelcast), everybody should push his bugfix/improvement/feature to his own git fork and send a pull request to merge with main repo. There will be no direct push to main repo branches. | |
| This requires everybody to work two separate remote repositories. First of all, everybody should have a fork of main repo in their own account (I guess nearly everybody has already a fork at the moment). If not, go to github.com/hazelcast/hazelcast and press the fork button (top rlght of the page). There may be lots of ways of working with multiple remote repos. I'll try to explain how I work, you can find an easier/comfortable way of your own.. | |
| Currently I (and most of you) already have a default remote named 'origin' for main repo. Add your own repo as another remote (You can list current remotes using: git remote -v); | |
| git remote add mdogan [email protected]:mdogan/hazelca |