public int size() { if(guavaMultiMap != null) return guavaMultiMap.size(); return hcMultiMap.size(); }
@ManagedAnnotation("size") public int getSize() { return managedObject.size(); }
@ManagedAnnotation("size") public int getSize() { return managedObject.size(); }
private boolean isEventComingFromNonRegisteredHazelcastInstance( final HazelcastInstance hazelcastInstance, final Set<SocketAddress> localSocketAddressesSet, final InetSocketAddress socketAddressOfEvent) { final MultiMap<SocketAddress, SocketAddress> configMultiMap = hazelcastInstance .getMultiMap(HazelcastLocalInstanceRegistrar.SPRING_INTEGRATION_INTERNAL_CLUSTER_MULTIMAP); return configMultiMap.size() > 0 && !configMultiMap.values().contains(socketAddressOfEvent) && localSocketAddressesSet.contains(configMultiMap.keySet().iterator().next()); }
protected void handleSize(String[] args) { int size = 0; String iteratorStr = args[0]; if (iteratorStr.startsWith("s.")) { size = getSet().size(); } else if (iteratorStr.startsWith("m.")) { size = getMap().size(); } else if (iteratorStr.startsWith("mm.")) { size = getMultiMap().size(); } else if (iteratorStr.startsWith("q.")) { size = getQueue().size(); } else if (iteratorStr.startsWith("l.")) { size = getList().size(); } println("Size = " + size); }
protected void handleSize(String[] args) { int size = 0; String iteratorStr = args[0]; if (iteratorStr.startsWith("s.")) { size = getSet().size(); } else if (iteratorStr.startsWith("m.")) { size = getMap().size(); } else if (iteratorStr.startsWith("mm.")) { size = getMultiMap().size(); } else if (iteratorStr.startsWith("q.")) { size = getQueue().size(); } else if (iteratorStr.startsWith("l.")) { size = getList().size(); } println("Size = " + size); }
protected void handleSize(String[] args) { int size = 0; String iteratorStr = args[0]; if (iteratorStr.startsWith("s.")) { size = getSet().size(); } else if (iteratorStr.startsWith("m.")) { size = getMap().size(); } else if (iteratorStr.startsWith("mm.")) { size = getMultiMap().size(); } else if (iteratorStr.startsWith("q.")) { size = getQueue().size(); } else if (iteratorStr.startsWith("l.")) { size = getList().size(); } println("Size: " + size); }
protected void handleSize(String[] args) { int size = 0; String iteratorStr = args[0]; if (iteratorStr.startsWith("s.")) { size = getSet().size(); } else if (iteratorStr.startsWith("m.")) { size = getMap().size(); } else if (iteratorStr.startsWith("mm.")) { size = getMultiMap().size(); } else if (iteratorStr.startsWith("q.")) { size = getQueue().size(); } else if (iteratorStr.startsWith("l.")) { size = getList().size(); } println("Size: " + size); }
private void syncConfigurationMultiMap(HazelcastInstance hazelcastInstance) { Lock lock = hazelcastInstance.getLock(SPRING_INTEGRATION_INTERNAL_CLUSTER_LOCK); lock.lock(); try { MultiMap<SocketAddress, SocketAddress> multiMap = hazelcastInstance .getMultiMap(SPRING_INTEGRATION_INTERNAL_CLUSTER_MULTIMAP); for (HazelcastInstance localInstance : Hazelcast.getAllHazelcastInstances()) { SocketAddress localInstanceSocketAddress = localInstance.getLocalEndpoint().getSocketAddress(); if (multiMap.size() == 0) { multiMap.put(localInstanceSocketAddress, localInstanceSocketAddress); } else { multiMap.put(multiMap.keySet().iterator().next(), localInstanceSocketAddress); } } } finally { lock.unlock(); } }
private static void verifyMultiMapForPayload( final MultiMap<Integer, HazelcastIntegrationTestUser> multiMap) { int index = 1; assertNotNull(multiMap); assertEquals(true, multiMap.size() == DATA_COUNT); SortedSet<Integer> keys = new TreeSet<>(multiMap.keySet()); for (Integer key : keys) { assertNotNull(key); assertEquals(index, key.intValue()); HazelcastIntegrationTestUser user = multiMap.get(key).iterator().next(); verifyHazelcastIntegrationTestUser(user, index); index++; } }
public void start(String[] args) { getMap().size(); getList().size(); getSet().size(); getQueue().size(); getMultiMap().size(); if (lineReader == null) { lineReader = new DefaultLineReader(); } running = true; while (running) { print("hazelcast[" + namespace + "] > "); try { final String command = lineReader.readLine(); handleCommand(command); } catch (Throwable e) { e.printStackTrace(); } } }
public void start(String[] args) { getMap().size(); getList().size(); getSet().size(); getQueue().size(); getMultiMap().size(); if (lineReader == null) { lineReader = new DefaultLineReader(); } running = true; while (running) { print("hazelcast[" + namespace + "] > "); try { final String command = lineReader.readLine(); handleCommand(command); } catch (Throwable e) { e.printStackTrace(); } } }
public void start() throws Exception { getMap().size(); getList().size(); getSet().size(); getQueue().size(); getTopic().getLocalTopicStats(); getMultiMap().size(); hazelcast.getExecutorService("default").getLocalExecutorStats(); for (int i = 1; i <= LOAD_EXECUTORS_COUNT; i++) { hazelcast.getExecutorService(EXECUTOR_NAMESPACE + " " + i).getLocalExecutorStats(); } if (lineReader == null) { lineReader = new DefaultLineReader(); } running = true; while (running) { print("hazelcast[" + namespace + "] > "); try { final String command = lineReader.readLine(); handleCommand(command); } catch (Throwable e) { e.printStackTrace(); } } }
public void start() throws Exception { getMap().size(); getList().size(); getSet().size(); getQueue().size(); getTopic().getLocalTopicStats(); getMultiMap().size(); hazelcast.getExecutorService("default").getLocalExecutorStats(); for (int i = 1; i <= LOAD_EXECUTORS_COUNT; i++) { hazelcast.getExecutorService(EXECUTOR_NAMESPACE + " " + i).getLocalExecutorStats(); } if (lineReader == null) { lineReader = new DefaultLineReader(); } running = true; while (running) { print("hazelcast[" + namespace + "] > "); try { final String command = lineReader.readLine(); handleCommand(command); } catch (Throwable e) { e.printStackTrace(); } } }