@Ignore @Test public void testSize() throws Throwable { clearTests(); AsyncConsistentSetMultimap map = createResource(3); map.isEmpty().thenAccept(result -> assertTrue(result)); map.put(keyOne, valueOne). thenAccept(result -> assertTrue(result)).join(); map.isEmpty().thenAccept(result -> assertFalse(result)); map.size().thenAccept(result -> assertEquals(1, (int) result)) .join(); map.put(keyOne, valueTwo). thenAccept(result -> assertTrue(result)).join(); map.size().thenAccept(result -> assertEquals(2, (int) result)) .join(); map.put(keyOne, valueOne). thenAccept(result -> assertFalse(result)).join(); map.size().thenAccept(result -> assertEquals(2, (int) result)) .join(); map.put(keyTwo, valueOne) .thenAccept(result -> assertTrue(result)).join(); map.put(keyTwo, valueTwo) .thenAccept(result -> assertTrue(result)).join(); map.size().thenAccept(result -> assertEquals(4, (int) result)) .join(); map.remove(keyOne, valueOne). thenAccept(result -> assertTrue(result)).join(); map.size().thenAccept(result -> assertEquals(3, (int) result)) .join(); map.remove(keyOne, valueOne). thenAccept(result -> assertFalse(result)).join(); map.size().thenAccept(result -> assertEquals(3, (int) result)) .join(); map.clear().join(); map.size().thenAccept(result -> assertEquals(0, (int) result)) .join(); map.isEmpty().thenAccept(result -> assertTrue(result)); map.destroy().join(); clearTests(); }
@Override public CompletableFuture<Integer> size() { return client.submit(new Size()); }
AsyncConsistentSetMultimap extends AbstractResource<AsyncConsistentSetMultimap> implements AsyncConsistentMultimap<String, byte[]> { @Override public CompletableFuture<Integer> size() { return client.submit(new Size()); } }
AsyncConsistentSetMultimap extends AbstractResource<AsyncConsistentSetMultimap> implements AsyncConsistentMultimap<String, byte[]> { @Override public CompletableFuture<Integer> size() { return client.submit(new Size()); } AsyncConsistentSetMultimap(CopycatClient client,
                                      Properties properties); }
AsyncConsistentSetMultimap extends AbstractResource<AsyncConsistentSetMultimap> implements AsyncConsistentMultimap<String, byte[]> { @Override public CompletableFuture<Integer> size() { return client.submit(new Size()); } AsyncConsistentSetMultimap(CopycatClient client,
                                      Properties properties); @Override CompletableFuture<AsyncConsistentSetMultimap> open(); @Override CompletableFuture<Integer> size(); @Override CompletableFuture<Boolean> isEmpty(); @Override CompletableFuture<Boolean> containsKey(String key); @Override CompletableFuture<Boolean> containsValue(byte[] value); @Override CompletableFuture<Boolean> containsEntry(String key, byte[] value); @Override CompletableFuture<Boolean> put(String key, byte[] value); @Override CompletableFuture<Boolean> remove(String key, byte[] value); @Override CompletableFuture<Boolean> removeAll(String key, Collection<? extends byte[]> values); @Override CompletableFuture<Versioned<Collection<? extends byte[]>>> removeAll(String key); @Override CompletableFuture<Boolean> putAll(
            String key, Collection<? extends byte[]> values); @Override CompletableFuture<Versioned<Collection<? extends byte[]>>> replaceValues(
            String key, Collection<byte[]> values); @Override CompletableFuture<Void> clear(); @Override CompletableFuture<Versioned<Collection<? extends byte[]>>> get(String key); @Override CompletableFuture<Set<String>> keySet(); @Override CompletableFuture<Multiset<String>> keys(); CompletableFuture<Multiset<byte[]>> values(); @Override CompletableFuture<Collection<Map.Entry<String, byte[]>>> entries(); @Override CompletableFuture<Map<String, Collection<byte[]>>> asMap(); @Override String name(); }
AsyncConsistentSetMultimap extends AbstractResource<AsyncConsistentSetMultimap> implements AsyncConsistentMultimap<String, byte[]> { @Override public CompletableFuture<Integer> size() { return client.submit(new Size()); } AsyncConsistentSetMultimap(CopycatClient client,
                                      Properties properties); @Override CompletableFuture<AsyncConsistentSetMultimap> open(); @Override CompletableFuture<Integer> size(); @Override CompletableFuture<Boolean> isEmpty(); @Override CompletableFuture<Boolean> containsKey(String key); @Override CompletableFuture<Boolean> containsValue(byte[] value); @Override CompletableFuture<Boolean> containsEntry(String key, byte[] value); @Override CompletableFuture<Boolean> put(String key, byte[] value); @Override CompletableFuture<Boolean> remove(String key, byte[] value); @Override CompletableFuture<Boolean> removeAll(String key, Collection<? extends byte[]> values); @Override CompletableFuture<Versioned<Collection<? extends byte[]>>> removeAll(String key); @Override CompletableFuture<Boolean> putAll(
            String key, Collection<? extends byte[]> values); @Override CompletableFuture<Versioned<Collection<? extends byte[]>>> replaceValues(
            String key, Collection<byte[]> values); @Override CompletableFuture<Void> clear(); @Override CompletableFuture<Versioned<Collection<? extends byte[]>>> get(String key); @Override CompletableFuture<Set<String>> keySet(); @Override CompletableFuture<Multiset<String>> keys(); CompletableFuture<Multiset<byte[]>> values(); @Override CompletableFuture<Collection<Map.Entry<String, byte[]>>> entries(); @Override CompletableFuture<Map<String, Collection<byte[]>>> asMap(); @Override String name();  }