- private void readyTransaction(DOMStoreWriteTransaction transaction, ReadyTransaction message) {
- DOMStoreThreePhaseCommitCohort cohort = transaction.ready();
+ private void deleteData(DeleteData message, boolean returnSerialized) {
+ LOG.debug("deleteData at path : {}", message.getPath());
+ if (checkClosed()) {
+ return;
+ }
+
+ compositeModification.addModification(new DeleteModification(message.getPath()));
+ try {
+ transaction.getSnapshot().delete(message.getPath());
+ DeleteDataReply deleteDataReply = DeleteDataReply.INSTANCE;
+ getSender().tell(returnSerialized ? deleteDataReply.toSerializable(message.getVersion()) :
+ deleteDataReply, getSelf());
+ } catch(Exception e) {
+ getSender().tell(new akka.actor.Status.Failure(e), getSelf());
+ }
+ }
+
+ private void readyTransaction(boolean returnSerialized, boolean doImmediateCommit) {
+ String transactionID = getTransactionID();
+
+ LOG.debug("readyTransaction : {}", transactionID);
+
+ ShardDataTreeCohort cohort = transaction.ready();
+
+ getShardActor().forward(new ForwardedReadyTransaction(transactionID, getClientTxVersion(),
+ cohort, compositeModification, returnSerialized, doImmediateCommit), getContext());