mirror of https://github.com/apache/cloudstack.git
Remove unnecessary state machine entry after refactoring
sendMessageAsyncWithListener to use sendMessageAsync.
This commit is contained in:
parent
c13a691429
commit
e6faa47a4b
|
|
@ -41,8 +41,6 @@ public class ImageDataManagerImpl implements ImageDataManager {
|
|||
stateMachine.addTransition(TemplateState.Destroying, TemplateEvent.DestroyRequested, TemplateState.Destroying);
|
||||
stateMachine.addTransition(TemplateState.Destroying, TemplateEvent.OperationFailed, TemplateState.Destroying);
|
||||
stateMachine.addTransition(TemplateState.Destroying, TemplateEvent.OperationSucceeded, TemplateState.Destroyed);
|
||||
//TODO: this should not be needed, but it happened during testing where multiple success event is sent to callback
|
||||
stateMachine.addTransition(TemplateState.Ready, TemplateEvent.OperationSucceeded, TemplateState.Ready);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -108,9 +108,6 @@ public class ObjectInDataStoreManagerImpl implements ObjectInDataStoreManager {
|
|||
State.Destroyed);
|
||||
stateMachines.addTransition(State.Destroying, Event.OperationFailed,
|
||||
State.Destroying);
|
||||
//TODO: further investigate why an extra event is sent when it is alreay Ready
|
||||
stateMachines.addTransition(State.Ready, Event.OperationSuccessed,
|
||||
State.Ready);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ import com.cloud.agent.api.Answer;
|
|||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.StartupCommand;
|
||||
import com.cloud.agent.api.StartupStorageCommand;
|
||||
import com.cloud.agent.api.storage.DownloadAnswer;
|
||||
import com.cloud.agent.api.storage.UploadAnswer;
|
||||
import com.cloud.agent.api.storage.UploadCommand;
|
||||
import com.cloud.agent.api.storage.UploadProgressCommand;
|
||||
|
|
@ -57,7 +56,6 @@ import com.cloud.storage.Upload.Status;
|
|||
import com.cloud.storage.Upload.Type;
|
||||
import com.cloud.storage.UploadVO;
|
||||
import com.cloud.storage.dao.UploadDao;
|
||||
import com.cloud.storage.download.DownloadListener;
|
||||
import com.cloud.storage.upload.UploadState.UploadEvent;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
|
||||
|
|
@ -477,10 +475,6 @@ public class UploadListener implements Listener {
|
|||
@Override
|
||||
public void complete(Answer answer) {
|
||||
listener.processAnswers(id, -1, new Answer[] {answer});
|
||||
if (listener instanceof DownloadListener) {
|
||||
DownloadListener dwldListener = (DownloadListener)listener;
|
||||
dwldListener.getCallback().complete((DownloadAnswer)answer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue