Remove redundant modifiers from interfaces

This commit is contained in:
Andrew Gaul 2014-08-26 12:21:41 -07:00
parent b2cb898123
commit 1b824afbfc
22 changed files with 55 additions and 38 deletions

View File

@ -24,7 +24,7 @@ import org.jclouds.openstack.swift.reference.SwiftHeaders;
*
* @see <a href="http://www.rackspacecloud.com/cf-devguide-20090311.pdf" />
*/
public interface CloudFilesHeaders extends SwiftHeaders {
public final class CloudFilesHeaders extends SwiftHeaders {
public static final String CDN_ENABLED = "X-CDN-Enabled";
public static final String CDN_LOG_RETENTION = "X-Log-Retention";
@ -37,4 +37,8 @@ public interface CloudFilesHeaders extends SwiftHeaders {
public static final String CDN_CONTAINER_PURGE_OBJECT_EMAIL = "X-Purge-Email";
public static final String CDN_WEBSITE_INDEX = "X-Container-Meta-Web-Index";
public static final String CDN_WEBSITE_ERROR = "X-Container-Meta-Web-Error";
private CloudFilesHeaders() {
throw new AssertionError("intentionally unimplemented");
}
}

View File

@ -109,7 +109,7 @@ import com.google.inject.Provides;
@RequestFilters(RequestAuthorizeSignature.class)
@BlobScope(CONTAINER)
public interface S3AsyncClient extends Closeable {
static final String VERSION = "2006-03-01";
String VERSION = "2006-03-01";
/**
* Creates a default implementation of S3Object

View File

@ -19,15 +19,15 @@ package org.jclouds.openstack.swift.blobstore.strategy;
public interface MultipartUpload {
/* Maximum number of parts per upload */
public static final int MAX_NUMBER_OF_PARTS = 10000;
int MAX_NUMBER_OF_PARTS = 10000;
/* Maximum number of parts returned for a list parts request */
public static final int MAX_LIST_PARTS_RETURNED = 1000;
int MAX_LIST_PARTS_RETURNED = 1000;
/* Maximum number of multipart uploads returned in a list multipart uploads request */
public static final int MAX_LIST_MPU_RETURNED = 1000;
int MAX_LIST_MPU_RETURNED = 1000;
/*
* part size 5 MB to 5 GB, last part can be < 5 MB
*/
public static final long MIN_PART_SIZE = 5242880L;
public static final long MAX_PART_SIZE = 5368709120L;
long MIN_PART_SIZE = 5242880L;
long MAX_PART_SIZE = 5368709120L;
}

View File

@ -16,7 +16,7 @@
*/
package org.jclouds.openstack.swift.reference;
public interface SwiftHeaders {
public class SwiftHeaders {
public static final String ACCOUNT_TEMPORARY_URL_KEY = "X-Account-Meta-Temp-Url-Key";
public static final String ACCOUNT_BYTES_USED = "X-Account-Bytes-Used";
@ -33,4 +33,7 @@ public interface SwiftHeaders {
public static final String CONTAINER_READ = "X-Container-Read";
public static final String CONTAINER_WRITE = "X-Container-Write";
protected SwiftHeaders() {
throw new AssertionError("intentionally unimplemented");
}
}

View File

@ -24,7 +24,7 @@ package org.jclouds.openstack.services;
* @see <a href="http://docs.openstack.org/api/openstack-typeentity-service/2.0/content/Identity-Service-Concepts-e1362.html"
* />
*/
public interface ServiceType {
public class ServiceType {
/**
* Object Storage (Swift)
*/
@ -45,4 +45,8 @@ public interface ServiceType {
* Network Service (Quantum)
*/
public static final String NETWORK = "network";
protected ServiceType() {
throw new AssertionError("intentionally unimplemented");
}
}

View File

@ -21,7 +21,7 @@ package org.jclouds.http;
* HttpResponse.
*/
public interface HttpErrorHandler {
public static final HttpErrorHandler NOOP = new HttpErrorHandler() {
HttpErrorHandler NOOP = new HttpErrorHandler() {
public void handleError(HttpCommand command, HttpResponse response) {
if (response.getPayload() != null)
response.getPayload().release();

View File

@ -21,7 +21,7 @@ package org.jclouds.http;
* 500) based on the request's replayable status and the number of attempts already performed.
*/
public interface HttpRetryHandler {
public static final HttpRetryHandler ALWAYS_RETRY = new HttpRetryHandler() {
HttpRetryHandler ALWAYS_RETRY = new HttpRetryHandler() {
public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) {
return true;
}
@ -32,7 +32,7 @@ public interface HttpRetryHandler {
}
};
public static final HttpRetryHandler NEVER_RETRY = new HttpRetryHandler() {
HttpRetryHandler NEVER_RETRY = new HttpRetryHandler() {
public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) {
return false;
}

View File

@ -25,7 +25,7 @@ import com.google.inject.ImplementedBy;
@ImplementedBy(BackoffLimitedRetryHandler.class)
public interface IOExceptionRetryHandler {
public static final IOExceptionRetryHandler ALWAYS_RETRY = new IOExceptionRetryHandler() {
IOExceptionRetryHandler ALWAYS_RETRY = new IOExceptionRetryHandler() {
public boolean shouldRetryRequest(HttpCommand command, IOException response) {
return true;
}
@ -36,7 +36,7 @@ public interface IOExceptionRetryHandler {
}
};
public static final IOExceptionRetryHandler NEVER_RETRY = new IOExceptionRetryHandler() {
IOExceptionRetryHandler NEVER_RETRY = new IOExceptionRetryHandler() {
public boolean shouldRetryRequest(HttpCommand command, IOException response) {
return false;
}

View File

@ -32,12 +32,12 @@ import com.google.common.hash.HashCode;
import com.google.common.collect.ImmutableSet;
public interface ContentMetadata {
public static final Set<String> HTTP_HEADERS = ImmutableSet.of(CONTENT_LENGTH, CONTENT_MD5, CONTENT_TYPE,
Set<String> HTTP_HEADERS = ImmutableSet.of(CONTENT_LENGTH, CONTENT_MD5, CONTENT_TYPE,
CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, EXPIRES);
// See http://stackoverflow.com/questions/10584647/simpledateformat-parse-is-one-hour-out-using-rfc-1123-gmt-in-summer
// for why not using "zzz"
public static final String RFC1123_DATE_PATTERN = "EEE, dd MMM yyyyy HH:mm:ss Z";
String RFC1123_DATE_PATTERN = "EEE, dd MMM yyyyy HH:mm:ss Z";
/**
* Returns the total size of the payload, or the chunk that's available.

View File

@ -38,12 +38,12 @@ public interface Logger {
/**
* Assign to member to avoid NPE when no logging module is configured.
*/
public static final Logger NULL = new NullLogger();
Logger NULL = new NullLogger();
/**
* Assign to member to avoid NPE when no logging module is configured.
*/
public static final Logger CONSOLE = new ConsoleLogger();
Logger CONSOLE = new ConsoleLogger();
String getCategory();

View File

@ -32,7 +32,7 @@ import java.lang.annotation.Target;
@Retention(RUNTIME)
public @interface FormParams {
public static final String NULL = "FORM_NULL";
String NULL = "FORM_NULL";
String[] keys();

View File

@ -29,8 +29,8 @@ import java.lang.annotation.Target;
@Retention(RUNTIME)
public @interface PartParam {
// hacks as nulls are not allowed as default values
public static String NO_FILENAME = "---NO_FILENAME---";
public static String NO_CONTENT_TYPE = "---NO_CONTENT_TYPE---";
String NO_FILENAME = "---NO_FILENAME---";
String NO_CONTENT_TYPE = "---NO_CONTENT_TYPE---";
String name();

View File

@ -34,7 +34,7 @@ import java.lang.annotation.Target;
@Retention(RUNTIME)
public @interface PayloadParams {
public static final String NULL = "MAP_PAYLOAD_NULL";
String NULL = "MAP_PAYLOAD_NULL";
String[] keys();

View File

@ -32,7 +32,7 @@ import java.lang.annotation.Target;
@Retention(RUNTIME)
public @interface QueryParams {
public static final String NULL = "QUERY_NULL";
String NULL = "QUERY_NULL";
String [] keys();

View File

@ -28,7 +28,7 @@ import com.google.inject.ImplementedBy;
@ImplementedBy(JAXBParser.class)
public interface XMLParser {
/** The default xml header. */
static final String DEFAULT_XML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
String DEFAULT_XML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
/**
* Serialize the object into xml.

View File

@ -22,15 +22,15 @@ package org.jclouds.aws.s3.blobstore.strategy;
public interface MultipartUpload {
/* Maximum number of parts per upload */
public static final int MAX_NUMBER_OF_PARTS = 10000;
int MAX_NUMBER_OF_PARTS = 10000;
/* Maximum number of parts returned for a list parts request */
public static final int MAX_LIST_PARTS_RETURNED = 1000;
int MAX_LIST_PARTS_RETURNED = 1000;
/* Maximum number of multipart uploads returned in a list multipart uploads request */
public static final int MAX_LIST_MPU_RETURNED = 1000;
int MAX_LIST_MPU_RETURNED = 1000;
/*
* part size 5 MB to 5 GB, last part can be < 5 MB
*/
public static final long MIN_PART_SIZE = 5242880L;
public static final long MAX_PART_SIZE = 5368709120L;
long MIN_PART_SIZE = 5242880L;
long MAX_PART_SIZE = 5368709120L;
}

View File

@ -25,10 +25,10 @@ import org.jclouds.blobstore.domain.Blob;
@ImplementedBy(AzureBlobBlockUploadStrategy.class)
public interface MultipartUploadStrategy {
/* Maximum number of blocks per upload */
public static final int MAX_NUMBER_OF_BLOCKS = 50000;
int MAX_NUMBER_OF_BLOCKS = 50000;
/* Maximum block size */
public static final long MAX_BLOCK_SIZE = 4L * 1024 * 1024;
long MAX_BLOCK_SIZE = 4L * 1024 * 1024;
String execute(String container, Blob blob);
}

View File

@ -24,7 +24,7 @@ import org.jclouds.openstack.swift.reference.SwiftHeaders;
*
* @see <a href="https://manage.hpcloud.com/pages/build/docs/objectstorage-lvs/api" />
*/
public interface HPCloudObjectStorageHeaders extends SwiftHeaders {
public final class HPCloudObjectStorageHeaders extends SwiftHeaders {
public static final String CDN_ENABLED = "X-Cdn-Enabled";
public static final String CDN_LOG_RETENTION = "X-Log-Retention";
@ -33,4 +33,7 @@ public interface HPCloudObjectStorageHeaders extends SwiftHeaders {
public static final String CDN_URI = "X-Cdn-Uri";
public static final String CDN_USER_AGENT_ACL = "X-User-Agent-ACL";
private HPCloudObjectStorageHeaders() {
throw new AssertionError("intentionally unimplemented");
}
}

View File

@ -26,7 +26,7 @@ import org.jclouds.openstack.services.ServiceType;
* @see <a href="http://docs.openstack.org/api/openstack-typeentity-service/2.0/content/Identity-Service-Concepts-e1362.html"
* />
*/
public interface HPExtensionServiceType extends ServiceType {
public final class HPExtensionServiceType extends ServiceType {
/**
* CDN
*/
@ -36,4 +36,7 @@ public interface HPExtensionServiceType extends ServiceType {
*/
public static final String BLOCK_STORE = "hpext:block-store";
private HPExtensionServiceType() {
throw new AssertionError("intentionally unimplemented");
}
}

View File

@ -43,8 +43,8 @@ import org.jclouds.softlayer.domain.VirtualGuestBlockDeviceTemplateGroup;
@Consumes(MediaType.APPLICATION_JSON)
public interface AccountApi {
public static String GUEST_MASK = "children.blockDevices.diskImage.softwareReferences.softwareDescription";
public static String LIST_GUEST_MASK = "powerState;operatingSystem.passwords;datacenter;billingItem;blockDevices" +
String GUEST_MASK = "children.blockDevices.diskImage.softwareReferences.softwareDescription";
String LIST_GUEST_MASK = "powerState;operatingSystem.passwords;datacenter;billingItem;blockDevices" +
".diskImage;tagReferences";
/**

View File

@ -49,7 +49,7 @@ import org.jclouds.softlayer.domain.VirtualGuest;
@Consumes(MediaType.APPLICATION_JSON)
public interface VirtualGuestApi {
public static String GUEST_MASK = "id;hostname;domain;fullyQualifiedDomainName;powerState;maxCpu;maxMemory;" +
String GUEST_MASK = "id;hostname;domain;fullyQualifiedDomainName;powerState;maxCpu;maxMemory;" +
"statusId;operatingSystem.passwords;primaryBackendIpAddress;primaryIpAddress;activeTransactionCount;" +
"blockDevices.diskImage;datacenter;tagReferences";

View File

@ -42,7 +42,7 @@ import org.jclouds.softlayer.domain.VirtualGuestBlockDeviceTemplateGroup;
@Consumes(MediaType.APPLICATION_JSON)
public interface VirtualGuestBlockDeviceTemplateGroupApi {
public static String LIST_PUBLIC_IMAGES_MASK = "children.blockDevices.diskImage.softwareReferences.softwareDescription";
String LIST_PUBLIC_IMAGES_MASK = "children.blockDevices.diskImage.softwareReferences.softwareDescription";
/**
* @return public images