import org.opendaylight.mdsal.dom.api.DOMDataTreeCandidate;
import org.opendaylight.mdsal.dom.api.DOMDataTreeCommitCohort;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* Proxy actor which acts as a facade to the user-provided commit cohort. Responsible for
* decapsulating DataTreeChanged messages and dispatching their context to the user.
*/
final class DataTreeCohortActor extends AbstractUntypedActor {
- private static final Logger LOG = LoggerFactory.getLogger(DataTreeCohortActor.class);
private final CohortBehaviour<?> idleState = new Idle();
private final DOMDataTreeCommitCohort cohort;
private CohortBehaviour<?> currentState = idleState;
*
* @param <R> Reply message type
*/
- static abstract class CommitProtocolCommand<R extends CommitReply> {
+ abstract static class CommitProtocolCommand<R extends CommitReply> {
private final TransactionIdentifier txId;
}
- static abstract class CommitReply {
+ abstract static class CommitReply {
private final ActorRef cohortRef;
private final TransactionIdentifier txId;
static final class Success extends CommitReply {
- public Success(ActorRef cohortRef, TransactionIdentifier txId) {
+ Success(ActorRef cohortRef, TransactionIdentifier txId) {
super(cohortRef, txId);
}
static final class PreCommit extends CommitProtocolCommand<Success> {
- public PreCommit(TransactionIdentifier txId) {
+ PreCommit(TransactionIdentifier txId) {
super(txId);
}
}
static final class Abort extends CommitProtocolCommand<Success> {
- public Abort(TransactionIdentifier txId) {
+ Abort(TransactionIdentifier txId) {
super(txId);
}
}
static final class Commit extends CommitProtocolCommand<Success> {
- public Commit(TransactionIdentifier txId) {
+ Commit(TransactionIdentifier txId) {
super(txId);
}
}
- private static abstract class CohortBehaviour<E> {
+ private abstract static class CohortBehaviour<E> {
abstract Class<E> getHandledMessageType();
}
@Override
+ @SuppressWarnings("checkstyle:IllegalCatch")
CohortBehaviour<?> process(CanCommit message) {
final PostCanCommitStep nextStep;
try {
}
@Override
+ @SuppressWarnings("checkstyle:IllegalCatch")
final CohortBehaviour<?> abort() {
try {
getStep().abort().get();
}
@Override
+ @SuppressWarnings("checkstyle:IllegalCatch")
CohortBehaviour<?> process(PreCommit message) {
final PostPreCommitStep nextStep;
try {
}
@Override
+ @SuppressWarnings("checkstyle:IllegalCatch")
CohortBehaviour<?> process(Commit message) {
try {
getStep().commit().get();