Skip to content
Snippets Groups Projects
Commit da40e1a9 authored by cramakri's avatar cramakri
Browse files

LMS-1503 Refactored TransferredDataSetHandler.RegistrationHelper

SVN: 16238
parent 97912e06
No related branches found
No related tags found
No related merge requests found
...@@ -349,8 +349,6 @@ public final class TransferredDataSetHandler implements IPathHandler, ISelfTesta ...@@ -349,8 +349,6 @@ public final class TransferredDataSetHandler implements IPathHandler, ISelfTesta
private final class RegistrationHelper extends DataSetRegistrationAlgorithm private final class RegistrationHelper extends DataSetRegistrationAlgorithm
{ {
private final TransferredDataSetHandler transferredDataSetHandler;
/** /**
* @param transferredDataSetHandler * @param transferredDataSetHandler
* @param incomingDataSetFile * @param incomingDataSetFile
...@@ -360,7 +358,6 @@ public final class TransferredDataSetHandler implements IPathHandler, ISelfTesta ...@@ -360,7 +358,6 @@ public final class TransferredDataSetHandler implements IPathHandler, ISelfTesta
File incomingDataSetFile, IDelegatedActionWithResult<Boolean> cleanAftrewardsAction) File incomingDataSetFile, IDelegatedActionWithResult<Boolean> cleanAftrewardsAction)
{ {
super(incomingDataSetFile, cleanAftrewardsAction); super(incomingDataSetFile, cleanAftrewardsAction);
this.transferredDataSetHandler = transferredDataSetHandler;
} }
// state accessors // state accessors
...@@ -463,9 +460,8 @@ public final class TransferredDataSetHandler implements IPathHandler, ISelfTesta ...@@ -463,9 +460,8 @@ public final class TransferredDataSetHandler implements IPathHandler, ISelfTesta
@Override @Override
protected void rollback(final Throwable throwable) throws Error protected void rollback(final Throwable throwable) throws Error
{ {
this.transferredDataSetHandler.stopped |= stopped |= throwable instanceof InterruptedExceptionUnchecked;
throwable instanceof InterruptedExceptionUnchecked; if (stopped)
if (this.transferredDataSetHandler.stopped)
{ {
Thread.interrupted(); // Ensure the thread's interrupted state is cleared. Thread.interrupted(); // Ensure the thread's interrupted state is cleared.
getOperationLog().warn( getOperationLog().warn(
...@@ -484,7 +480,7 @@ public final class TransferredDataSetHandler implements IPathHandler, ISelfTesta ...@@ -484,7 +480,7 @@ public final class TransferredDataSetHandler implements IPathHandler, ISelfTesta
throw (Error) throwable; throw (Error) throwable;
} }
UnstoreDataAction action = rollbackStorageProcessor(throwable); UnstoreDataAction action = rollbackStorageProcessor(throwable);
if (this.transferredDataSetHandler.stopped == false) if (stopped == false)
{ {
if (action == UnstoreDataAction.MOVE_TO_ERROR) if (action == UnstoreDataAction.MOVE_TO_ERROR)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment