Package com.basho.riak.client.raw

Examples of com.basho.riak.client.raw.StoreMeta$Builder


     */
    public T execute() throws RiakRetryFailedException, UnresolvedConflictException, ConversionException {
        final T resolved = fetchObject.execute();
        final T mutated = mutation.apply(resolved);
        final IRiakObject o = converter.fromDomain(mutated, fetchObject.getVClock());
        final StoreMeta storeMeta = storeMetaBuilder.returnBody(returnBody).build();

        // if non match and if not modified require extra data for the HTTP API
        // pull that from the riak object if possible
        if(storeMeta.hasIfNoneMatch() && storeMeta.getIfNoneMatch() && o != null) {
            storeMeta.etags(new String[] {o.getVtag()});
        }

        if(storeMeta.hasIfNotModified() && storeMeta.getIfNotModified()  && o != null) {
            storeMeta.lastModified(o.getLastModified());
        }

        final RiakResponse stored = retrier.attempt(new Callable<RiakResponse>() {
            public RiakResponse call() throws Exception {
                return client.store(o, storeMeta);
View Full Code Here


     */
    public T execute() throws RiakRetryFailedException, UnresolvedConflictException, ConversionException {
        final T resolved = fetchObject.execute();
        final T mutated = mutation.apply(resolved);
        final IRiakObject o = converter.fromDomain(mutated, fetchObject.getVClock());
        final StoreMeta storeMeta = generateStoreMeta();

        // if non match and if not modified require extra data for the HTTP API
        // pull that from the riak object if possible
        if(storeMeta.hasIfNonMatch() && storeMeta.getIfNonMatch() && o != null) {
            storeMeta.etags(new String[] {o.getVtag()});
        }

        if(storeMeta.hasIfNotModified() && storeMeta.getIfNotModified()  && o != null) {
            storeMeta.lastModified(o.getLastModified());
        }

        final RiakResponse stored = retrier.attempt(new Callable<RiakResponse>() {
            public RiakResponse call() throws Exception {
                return client.store(o, storeMeta);
View Full Code Here

    /**
     * Create a {@link StoreMeta} instance from this operation's parameters.
     * @return a {@link StoreMeta} populated with the store parameters.
     */
    private StoreMeta generateStoreMeta() {
        return new StoreMeta(w, dw, pw, returnBody, ifNonMatch, ifNotModified);
    }
View Full Code Here

     */
    public T execute() throws RiakRetryFailedException, UnresolvedConflictException, ConversionException {
        final T resolved = fetchObject.execute();
        final T mutated = mutation.apply(resolved);
        final IRiakObject o = converter.fromDomain(mutated, fetchObject.getVClock());
        final StoreMeta storeMeta = storeMetaBuilder.returnBody(returnBody).build();

        // if non match and if not modified require extra data for the HTTP API
        // pull that from the riak object if possible
        if(storeMeta.hasIfNoneMatch() && storeMeta.getIfNoneMatch() && o != null) {
            storeMeta.etags(new String[] {o.getVtag()});
        }

        if(storeMeta.hasIfNotModified() && storeMeta.getIfNotModified()  && o != null) {
            storeMeta.lastModified(o.getLastModified());
        }

        final RiakResponse stored = retrier.attempt(new Callable<RiakResponse>() {
            public RiakResponse call() throws Exception {
                return client.store(o, storeMeta);
View Full Code Here

            vclock = VClockUtil.getVClock(mutated);
        }
       
       
        final IRiakObject o = converter.fromDomain(mutated, vclock);
        final StoreMeta storeMeta = storeMetaBuilder.returnBody(returnBody).build();

        // if non match and if not modified require extra data for the HTTP API
        // pull that from the riak object if possible
        if(storeMeta.hasIfNoneMatch() && storeMeta.getIfNoneMatch() && o != null) {
            storeMeta.etags(new String[] {o.getVtag()});
        }

        if(storeMeta.hasIfNotModified() && storeMeta.getIfNotModified()  && o != null) {
            storeMeta.lastModified(o.getLastModified());
        }

        final boolean hasMutated =
            mutation instanceof ConditionalStoreMutation<?>
            ? ((ConditionalStoreMutation<T>)mutation).hasMutated()
View Full Code Here

            vclock = VClockUtil.getVClock(mutated);
        }
       
       
        final IRiakObject o = converter.fromDomain(mutated, vclock);
        final StoreMeta storeMeta = storeMetaBuilder.returnBody(returnBody).build();

        // if non match and if not modified require extra data for the HTTP API
        // pull that from the riak object if possible
        if(storeMeta.hasIfNoneMatch() && storeMeta.getIfNoneMatch() && o != null) {
            storeMeta.etags(new String[] {o.getVtag()});
        }

        if(storeMeta.hasIfNotModified() && storeMeta.getIfNotModified()  && o != null) {
            storeMeta.lastModified(o.getLastModified());
        }

        final boolean hasMutated =
            mutation instanceof ConditionalStoreMutation<?>
            ? ((ConditionalStoreMutation<T>)mutation).hasMutated()
View Full Code Here

            vclock = VClockUtil.getVClock(mutated);
        }
       
       
        final IRiakObject o = converter.fromDomain(mutated, vclock);
        final StoreMeta storeMeta = storeMetaBuilder.returnBody(returnBody).build();

        // if non match and if not modified require extra data for the HTTP API
        // pull that from the riak object if possible
        if(storeMeta.hasIfNoneMatch() && storeMeta.getIfNoneMatch() && o != null) {
            storeMeta.etags(new String[] {o.getVtag()});
        }

        if(storeMeta.hasIfNotModified() && storeMeta.getIfNotModified()  && o != null) {
            storeMeta.lastModified(o.getLastModified());
        }

        final boolean hasMutated =
            mutation instanceof ConditionalStoreMutation<?>
            ? ((ConditionalStoreMutation<T>)mutation).hasMutated()
View Full Code Here

            vclock = VClockUtil.getVClock(mutated);
        }
       
       
        final IRiakObject o = converter.fromDomain(mutated, vclock);
        final StoreMeta storeMeta = storeMetaBuilder.returnBody(returnBody).build();

        // if non match and if not modified require extra data for the HTTP API
        // pull that from the riak object if possible
        if(storeMeta.hasIfNoneMatch() && storeMeta.getIfNoneMatch() && o != null) {
            storeMeta.etags(new String[] {o.getVtag()});
        }

        if(storeMeta.hasIfNotModified() && storeMeta.getIfNotModified()  && o != null) {
            storeMeta.lastModified(o.getLastModified());
        }

        final RiakResponse stored = retrier.attempt(new Callable<RiakResponse>() {
            public RiakResponse call() throws Exception {
                return client.store(o, storeMeta);
View Full Code Here

TOP

Related Classes of com.basho.riak.client.raw.StoreMeta$Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.