Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

using more appropriate createMutator method name

  • Loading branch information...
commit 6a6cd2af088dd594a8b5f274b9174662ce56c5ef 1 parent 273ca1b
zznate authored
View
6 ...src/main/java/me/prettyprint/cassandra/service/template/AbstractColumnFamilyTemplate.java
@@ -115,7 +115,7 @@ public MutationResult executeBatch(Mutator<K> mutator) {
return result;
}
- public Mutator<K> getMutator() {
+ public Mutator<K> createMutator() {
return HFactory.createMutator(keyspace, keySerializer);
}
@@ -154,7 +154,7 @@ protected MutationResult executeIfNotBatched(AbstractTemplateUpdater<K, N> updat
* @param key
*/
public void deleteRow(K key) {
- getMutator().addDeletion(key, columnFamily, null, topSerializer).execute();
+ createMutator().addDeletion(key, columnFamily, null, topSerializer).execute();
}
/**
@@ -173,7 +173,7 @@ public void deleteRow(Mutator<K> mutator, K key) {
* @param columnName
*/
public void deleteColumn(K key, N columnName) {
- getMutator().addDeletion(key, columnFamily, columnName, topSerializer).execute();
+ createMutator().addDeletion(key, columnFamily, columnName, topSerializer).execute();
}
/**
View
2  core/src/main/java/me/prettyprint/cassandra/service/template/ColumnFamilyUpdater.java
@@ -50,7 +50,7 @@
* @param columnFactory
*/
public ColumnFamilyUpdater(ColumnFamilyTemplate<K, N> template, ColumnFactory columnFactory) {
- super(template, columnFactory, template.getMutator());
+ super(template, columnFactory, template.createMutator());
}
/**
View
4 core/src/main/java/me/prettyprint/cassandra/service/template/SuperCfTemplate.java
@@ -202,7 +202,7 @@ public void update(SuperCfUpdater<K, SN, N> updater) {
*/
@Override
public void deleteColumn(K key, SN sColumnName) {
- getMutator().superDelete(key, getColumnFamily(), sColumnName, topSerializer);
+ createMutator().superDelete(key, getColumnFamily(), sColumnName, topSerializer);
}
/**
@@ -210,7 +210,7 @@ public void deleteColumn(K key, SN sColumnName) {
*/
@Override
public void deleteRow(K key) {
- getMutator().delete(key, getColumnFamily(), null, null);
+ createMutator().delete(key, getColumnFamily(), null, null);
}
protected abstract SuperCfResult<K,SN,N> doExecuteSlice(K key, SN sColumnName, HSlicePredicate<SN> predicate);
View
2  core/src/main/java/me/prettyprint/cassandra/service/template/SuperCfUpdater.java
@@ -64,7 +64,7 @@
private List<HColumn> subColumns;
public SuperCfUpdater(SuperCfTemplate<K,SN,N> sTemplate, ColumnFactory columnFactory) {
- super((AbstractColumnFamilyTemplate<K, N>) sTemplate, columnFactory, sTemplate.getMutator());
+ super((AbstractColumnFamilyTemplate<K, N>) sTemplate, columnFactory, sTemplate.createMutator());
this.template = sTemplate;
}

0 comments on commit 6a6cd2a

Please sign in to comment.
Something went wrong with that request. Please try again.