@Test public void testInitialize() throws Exception { store.initialize(); verify(client).execute(any(StoreBucketProperties.class)); }
public void initialize() { final boolean allowMulti = true; LOGGER.debug("Setting allow_multi={} for namespace={}", allowMulti, NAMESPACE); final StoreBucketProperties storeBucketProperties = new StoreBucketProperties.Builder(NAMESPACE).withAllowMulti(allowMulti).build(); try { client.execute(storeBucketProperties); } catch (InterruptedException e) { LOGGER.warn( String.format("Unable to set allow_multi=%s for namespace=%s", allowMulti, NAMESPACE), e); Thread.currentThread().interrupt(); } catch (ExecutionException e) { LOGGER.error( String.format("Unable to set allow_multi=%s for namespace=%s", allowMulti, NAMESPACE), e); } }
CursorStore { public void initialize() { final boolean allowMulti = true; LOGGER.debug("Setting allow_multi={} for namespace={}", allowMulti, NAMESPACE); final StoreBucketProperties storeBucketProperties = new StoreBucketProperties.Builder(NAMESPACE).withAllowMulti(allowMulti).build(); try { client.execute(storeBucketProperties); } catch (InterruptedException e) { LOGGER.warn( String.format("Unable to set allow_multi=%s for namespace=%s", allowMulti, NAMESPACE), e); Thread.currentThread().interrupt(); } catch (ExecutionException e) { LOGGER.error( String.format("Unable to set allow_multi=%s for namespace=%s", allowMulti, NAMESPACE), e); } } }
CursorStore { public void initialize() { final boolean allowMulti = true; LOGGER.debug("Setting allow_multi={} for namespace={}", allowMulti, NAMESPACE); final StoreBucketProperties storeBucketProperties = new StoreBucketProperties.Builder(NAMESPACE).withAllowMulti(allowMulti).build(); try { client.execute(storeBucketProperties); } catch (InterruptedException e) { LOGGER.warn( String.format("Unable to set allow_multi=%s for namespace=%s", allowMulti, NAMESPACE), e); Thread.currentThread().interrupt(); } catch (ExecutionException e) { LOGGER.error( String.format("Unable to set allow_multi=%s for namespace=%s", allowMulti, NAMESPACE), e); } } CursorStore(
      final RiakClient client, final Duration timeout, final Duration requestTimeout); }
CursorStore { public void initialize() { final boolean allowMulti = true; LOGGER.debug("Setting allow_multi={} for namespace={}", allowMulti, NAMESPACE); final StoreBucketProperties storeBucketProperties = new StoreBucketProperties.Builder(NAMESPACE).withAllowMulti(allowMulti).build(); try { client.execute(storeBucketProperties); } catch (InterruptedException e) { LOGGER.warn( String.format("Unable to set allow_multi=%s for namespace=%s", allowMulti, NAMESPACE), e); Thread.currentThread().interrupt(); } catch (ExecutionException e) { LOGGER.error( String.format("Unable to set allow_multi=%s for namespace=%s", allowMulti, NAMESPACE), e); } } CursorStore(
      final RiakClient client, final Duration timeout, final Duration requestTimeout); void initialize(); Optional<String> fetch(final String username, final String cursorName); void store(final String username, final String cursorName, final String value); void delete(final String username, final String cursorName); String getCursorKey(final String username, final String cursorName); }
CursorStore { public void initialize() { final boolean allowMulti = true; LOGGER.debug("Setting allow_multi={} for namespace={}", allowMulti, NAMESPACE); final StoreBucketProperties storeBucketProperties = new StoreBucketProperties.Builder(NAMESPACE).withAllowMulti(allowMulti).build(); try { client.execute(storeBucketProperties); } catch (InterruptedException e) { LOGGER.warn( String.format("Unable to set allow_multi=%s for namespace=%s", allowMulti, NAMESPACE), e); Thread.currentThread().interrupt(); } catch (ExecutionException e) { LOGGER.error( String.format("Unable to set allow_multi=%s for namespace=%s", allowMulti, NAMESPACE), e); } } CursorStore(
      final RiakClient client, final Duration timeout, final Duration requestTimeout); void initialize(); Optional<String> fetch(final String username, final String cursorName); void store(final String username, final String cursorName, final String value); void delete(final String username, final String cursorName); String getCursorKey(final String username, final String cursorName);  }