com.basho.riak.client.api.commands.buckets.ResetBucketProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of riak-client Show documentation
Show all versions of riak-client Show documentation
HttpClient-based client for Riak
The newest version!
package com.basho.riak.client.api.commands.buckets;
import com.basho.riak.client.api.AsIsRiakCommand;
import com.basho.riak.client.core.operations.ResetBucketPropsOperation;
import com.basho.riak.client.core.query.Namespace;
/**
* Command used to reset the properties of a bucket in Riak.
*
*
* {@code
* Namespace ns = new Namespace("my_type", "my_bucket");
* ResetBucketProperties rbp =
* new ResetBucketProperties.Builder(ns)
* .build();
* client.execute(rbp);}
*
* @author Chris Mancini
* @since 2.0
*/
public class ResetBucketProperties extends AsIsRiakCommand
{
private final Namespace namespace;
public ResetBucketProperties(Builder builder)
{
this.namespace = builder.namespace;
}
@Override
protected ResetBucketPropsOperation buildCoreOperation() {
ResetBucketPropsOperation.Builder builder =
new ResetBucketPropsOperation.Builder(namespace);
return builder.build();
}
public static class Builder
{
private final Namespace namespace;
public Builder(Namespace namespace)
{
if (namespace == null)
{
throw new IllegalArgumentException("Namespace cannot be null");
}
this.namespace = namespace;
}
public ResetBucketProperties build()
{
return new ResetBucketProperties(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy