Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,10 @@ public void setShutdownScripts(List<String> scripts) {

private static Compression convertCompressionType(CompressionType type) {
switch (type) {
case NONE:
return Compression.NONE;
case SNAPPY:
return Compression.SNAPPY;
case NONE:
return Compression.NONE;
case SNAPPY:
return Compression.SNAPPY;
}
throw new IllegalArgumentException("unknown compression type " + type);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@
import org.springframework.util.Assert;

/**
* A single keyspace XML Element can result in multiple actions. Example: {@literal CREATE_DROP}.
*
* This FactoryBean inspects the action required to satisfy the keyspace element, and then returns a Set of atomic
* A single keyspace XML Element can result in multiple actions. Example: {@literal CREATE_DROP}. This FactoryBean
* inspects the action required to satisfy the keyspace element, and then returns a Set of atomic
* {@link KeyspaceActionSpecification} required to satisfy the configuration action.
*
* @author David Webb
*
*/
public class KeyspaceActionSpecificationFactoryBean implements FactoryBean<Set<KeyspaceActionSpecification<?>>>,
InitializingBean, DisposableBean {
Expand Down Expand Up @@ -74,14 +72,14 @@ public void afterPropertiesSet() throws Exception {
Assert.notNull(action, "Keyspace Action is required for a Keyspace Action");

switch (action) {
case CREATE_DROP:
specs.add(generateDropKeyspaceSpecification());
case CREATE:
// Assert.notNull(replicationStrategy, "Replication Strategy is required to create a Keyspace");
specs.add(generateCreateKeyspaceSpecification());
break;
case ALTER:
break;
case CREATE_DROP:
specs.add(generateDropKeyspaceSpecification());
case CREATE:
// Assert.notNull(replicationStrategy, "Replication Strategy is required to create a Keyspace");
specs.add(generateCreateKeyspaceSpecification());
break;
case ALTER:
break;
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*
* @author David Webb
* @param <T>
*
*/
public class MultiLevelListFlattenerFactoryBean<T> implements FactoryBean<List<T>> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*
* @author David Webb
* @param <T>
*
*/
public class MultiLevelSetFlattenerFactoryBean<T> implements FactoryBean<Set<T>> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ public static void addPropertyReference(BeanDefinitionBuilder builder, String pr
* null or empty, and <code>defaultValue</code> is null or empty, then no property is added and this method
* silently returns.
* @param reference If <code>true</code>, this method will add the property as a reference, else as a value.
*
* @see BeanDefinitionBuilder#addPropertyReference(String, String)
* @see BeanDefinitionBuilder#addPropertyValue(String, Object)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
* Interface used to give an implementation access to a {@link ResultSetFuture} after the query has completed.
*
* @author David Webb
* @author Matthew T. Adams
*/
public interface AsynchronousQueryListener {

/**
* Called upon Query Completion.
* Called upon query completion.
*
* @param rsf The {@link ResultSetFuture}. Since this isn't called until the asynchronous query completes, it can be
* immediately interrogated.
* @param rsf The {@link ResultSetFuture}. Called when the query operation is completed.
*/
public void onQueryComplete(ResultSetFuture rsf);
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,10 @@

/**
* This Prepared Statement Creator maintains a cache of all prepared statements for the duration of this life of the
* container.
*
* When preparing statements with Cassandra, each Statement should be prepared once and only once due to the overhead of
* preparing the statement.
* container. When preparing statements with Cassandra, each Statement should be prepared once and only once due to the
* overhead of preparing the statement.
*
* @author David Webb
*
*/
public class CachedPreparedStatementCreator implements PreparedStatementCreator {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2013-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cassandra.core;

/**
* Interface allowing a caller to cancel an asynchronous query.
*
* @author Matthew T. Adams
*/
public interface Cancellable {

/**
* Cancels the query operation that this cancellable came from.
*/
void cancel();
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* Wrapper for all non RuntimeExceptions throws by the Cassandra Driver
*
* @author David Webb
*
*/
public class CassandraUncategorizedDataAccessException extends UncategorizedDataAccessException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
* Generic Consistency Levels associated with Cassandra.
*
* @author David Webb
*
*/
public enum ConsistencyLevel {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
* Determine driver consistency level based on ConsistencyLevel
*
* @author David Webb
*
*/
public final class ConsistencyLevelResolver {

/**
* No instances allowed
*/
private ConsistencyLevelResolver() {
}
private ConsistencyLevelResolver() {}

/**
* Decode the generic spring data cassandra enum to the type required by the DataStax Driver.
Expand All @@ -43,41 +41,41 @@ public static com.datastax.driver.core.ConsistencyLevel resolve(ConsistencyLevel
* Determine the driver level based on our enum
*/
switch (level) {
case ONE:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.ONE;
break;
case LOCAL_ONE:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.LOCAL_ONE;
break;
case ALL:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.ALL;
break;
case ANY:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.ANY;
break;
case EACH_QUOROM:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.EACH_QUORUM;
break;
case LOCAL_QUOROM:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.LOCAL_QUORUM;
break;
case QUOROM:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.QUORUM;
break;
case THREE:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.THREE;
break;
case TWO:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.TWO;
break;
case SERIAL:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.SERIAL;
break;
case LOCAL_SERIAL:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.LOCAL_SERIAL;
break;
default:
break;
case ONE:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.ONE;
break;
case LOCAL_ONE:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.LOCAL_ONE;
break;
case ALL:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.ALL;
break;
case ANY:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.ANY;
break;
case EACH_QUOROM:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.EACH_QUORUM;
break;
case LOCAL_QUOROM:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.LOCAL_QUORUM;
break;
case QUOROM:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.QUORUM;
break;
case THREE:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.THREE;
break;
case TWO:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.TWO;
break;
case SERIAL:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.SERIAL;
break;
case LOCAL_SERIAL:
resolvedLevel = com.datastax.driver.core.ConsistencyLevel.LOCAL_SERIAL;
break;
default:
break;
}

return resolvedLevel;
Expand Down
Loading