HBASE-10368 Add Mutation.setWriteToWAL() back to 0.98

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1558990 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Enis Soztutar 2014-01-17 02:20:03 +00:00
parent 4c2c982faa
commit 608d873be0
1 changed files with 23 additions and 1 deletions

View File

@ -209,6 +209,27 @@ public abstract class Mutation extends OperationWithAttributes implements Row, C
return map;
}
/**
* @deprecated Use {@link #getDurability()} instead.
* @return true if edits should be applied to WAL, false if not
*/
@Deprecated
public boolean getWriteToWAL() {
return this.durability == Durability.SKIP_WAL;
}
/**
* Set whether this Delete should be written to the WAL or not.
* Not writing the WAL means you may lose edits on server crash.
* This method will reset any changes made via {@link #setDurability(Durability)}
* @param write true if edits should be written to WAL, false if not
* @deprecated Use {@link #setDurability(Durability)} instead.
*/
@Deprecated
public void setWriteToWAL(boolean write) {
setDurability(write ? Durability.USE_DEFAULT : Durability.SKIP_WAL);
}
/**
* Set the durability for this mutation
* @param d
@ -288,6 +309,7 @@ public abstract class Mutation extends OperationWithAttributes implements Row, C
return this.row;
}
@Override
public int compareTo(final Row d) {
return Bytes.compareTo(this.getRow(), d.getRow());
}