Skip to content

Commit ce2120d

Browse files
committed
fix build
1 parent 5d1e97e commit ce2120d

6 files changed

Lines changed: 19 additions & 19 deletions

File tree

engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public T getAnswer() {
9191
@Override
9292
public Answer sendCommand(HypervisorHostEndPoint host, Command command) {
9393
SendCommandContext<Answer> context = new SendCommandContext<Answer>(null);
94-
AsyncCallbackDispatcher<HypervsiorHostEndPointRpcServer> caller = AsyncCallbackDispatcher.create(this);
94+
AsyncCallbackDispatcher<HypervsiorHostEndPointRpcServer, Answer> caller = AsyncCallbackDispatcher.create(this);
9595
caller.setCallback(caller.getTarget().sendCommandCallback(null, null))
9696
.setContext(context);
9797

@@ -109,7 +109,7 @@ public Answer sendCommand(HypervisorHostEndPoint host, Command command) {
109109
return context.getAnswer();
110110
}
111111

112-
protected Object sendCommandCallback(AsyncCallbackDispatcher<HypervsiorHostEndPointRpcServer> callback, SendCommandContext<Answer> context) {
112+
protected Object sendCommandCallback(AsyncCallbackDispatcher<HypervsiorHostEndPointRpcServer, Answer> callback, SendCommandContext<Answer> context) {
113113
context.setAnswer((Answer)callback.getResult());
114114
synchronized(context) {
115115
context.notify();

engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public StorageEntity getDataStore() {
204204
public boolean createVolumeFromTemplate(long dataStoreId, VolumeDiskType diskType, TemplateEntity template) {
205205
TemplateInfo ti = ((TemplateEntityImpl)template).getTemplateInfo();
206206

207-
AsyncCallbackDispatcher<VolumeEntityImpl> caller = AsyncCallbackDispatcher.create(this);
207+
AsyncCallbackDispatcher<VolumeEntityImpl, VolumeInfo> caller = AsyncCallbackDispatcher.create(this);
208208
caller.setCallback(caller.getTarget().createVolumeFromTemplateAsyncCallback(null, null));
209209

210210
vs.createVolumeFromTemplateAsync(volumeInfo, dataStoreId, diskType, ti, caller);
@@ -219,7 +219,7 @@ public boolean createVolumeFromTemplate(long dataStoreId, VolumeDiskType diskTyp
219219
}
220220

221221

222-
private Void createVolumeFromTemplateAsyncCallback(AsyncCompletionCallback<VolumeInfo> callback, Object context) {
222+
private Void createVolumeFromTemplateAsyncCallback(AsyncCallbackDispatcher<VolumeEntityImpl, VolumeInfo> callback, Object context) {
223223
synchronized (volumeInfo) {
224224
volumeInfo.notify();
225225
}
@@ -228,7 +228,7 @@ private Void createVolumeFromTemplateAsyncCallback(AsyncCompletionCallback<Volum
228228

229229
@Override
230230
public boolean createVolume(long dataStoreId, VolumeDiskType diskType) {
231-
AsyncCallbackDispatcher<VolumeEntityImpl> caller = AsyncCallbackDispatcher.create(this);
231+
AsyncCallbackDispatcher<VolumeEntityImpl, VolumeApiResult> caller = AsyncCallbackDispatcher.create(this);
232232
caller.setCallback(caller.getTarget().createVolumeCallback(null, null));
233233
vs.createVolumeAsync(volumeInfo, dataStoreId, diskType, caller);
234234
try {
@@ -245,7 +245,7 @@ public boolean createVolume(long dataStoreId, VolumeDiskType diskType) {
245245
}
246246
}
247247

248-
private Void createVolumeCallback(AsyncCallbackDispatcher<VolumeApiResult> callback, Object context) {
248+
private Void createVolumeCallback(AsyncCallbackDispatcher<VolumeApiResult, VolumeApiResult> callback, Object context) {
249249
synchronized (volumeInfo) {
250250
this.result = callback.getResult();
251251
volumeInfo.notify();

engine/storage/src/org/apache/cloudstack/storage/volume/VolumeService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,5 @@ public VolumeInfo getVolume() {
8787
VolumeEntity getVolumeEntity(long volumeId);
8888

8989
void createVolumeFromTemplateAsync(VolumeInfo volume, long dataStoreId, VolumeDiskType diskType, TemplateInfo template,
90-
AsyncCompletionCallback<VolumeApiResult> callback);
90+
AsyncCompletionCallback<VolumeInfo> callback);
9191
}

engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ public void createVolumeAsync(VolumeObject vol, AsyncCompletionCallback<CommandR
6565
CreateVolumeCommand createCmd = new CreateVolumeCommand(this.dataStore.getVolumeTO(volInfo));
6666

6767
CreateVolumeContext<CommandResult> context = new CreateVolumeContext<CommandResult>(callback, vol);
68-
AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl> caller = AsyncCallbackDispatcher.create(this);
68+
AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl, Answer> caller = AsyncCallbackDispatcher.create(this);
6969
caller.setContext(context)
7070
.setCallback(caller.getTarget().createVolumeAsyncCallback(null, null));
7171

7272
ep.sendMessageAsync(createCmd, caller);
7373
}
7474

75-
protected Void createVolumeAsyncCallback(AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl> callback, CreateVolumeContext<CommandResult> context) {
75+
protected Void createVolumeAsyncCallback(AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl, Answer> callback, CreateVolumeContext<CommandResult> context) {
7676
CommandResult result = new CommandResult();
7777
CreateVolumeAnswer volAnswer = (CreateVolumeAnswer) callback.getResult();
7878
if (volAnswer.getResult()) {
@@ -156,7 +156,7 @@ public void createVolumeFromBaseImageAsync(VolumeObject volume, TemplateOnPrimar
156156
EndPoint ep = endPoints.get(0);
157157

158158
CreateVolumeFromBaseImageContext<CommandResult> context = new CreateVolumeFromBaseImageContext<CommandResult>(callback, volume);
159-
AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl> caller = AsyncCallbackDispatcher.create(this);
159+
AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl, Answer> caller = AsyncCallbackDispatcher.create(this);
160160
caller.setContext(context)
161161
.setCallback(caller.getTarget().createVolumeFromBaseImageAsyncCallback(null, null));
162162

@@ -165,7 +165,7 @@ public void createVolumeFromBaseImageAsync(VolumeObject volume, TemplateOnPrimar
165165

166166
}
167167

168-
public Object createVolumeFromBaseImageAsyncCallback(AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl> callback, CreateVolumeFromBaseImageContext<CommandResult> context) {
168+
public Object createVolumeFromBaseImageAsyncCallback(AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl, Answer> callback, CreateVolumeFromBaseImageContext<CommandResult> context) {
169169
CreateVolumeAnswer answer = (CreateVolumeAnswer)callback.getResult();
170170
CommandResult result = new CommandResult();
171171
if (answer == null || answer.getDetails() != null) {

engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ public void createVolumeAsync(VolumeInfo volume, long dataStoreId, VolumeDiskTyp
9191
vo.stateTransit(Volume.Event.CreateRequested);
9292

9393
CreateVolumeContext<VolumeApiResult> context = new CreateVolumeContext<VolumeApiResult>(callback, vo);
94-
AsyncCallbackDispatcher<VolumeServiceImpl> caller = AsyncCallbackDispatcher.create(this);
94+
AsyncCallbackDispatcher<VolumeServiceImpl, CommandResult> caller = AsyncCallbackDispatcher.create(this);
9595
caller.setCallback(caller.getTarget().createVolumeCallback(null, null))
9696
.setContext(context);
9797

9898
dataStore.createVolumeAsync(vo, diskType, caller);
9999
}
100100

101-
protected Void createVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl> callback, CreateVolumeContext<VolumeApiResult> context) {
101+
protected Void createVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CommandResult> callback, CreateVolumeContext<VolumeApiResult> context) {
102102
CommandResult result = callback.getResult();
103103
VolumeObject vo = context.getVolume();
104104
VolumeApiResult volResult = new VolumeApiResult(vo);

plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111

1212
public class SolidfirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
1313

14-
@Override
15-
public boolean createVolumeAsync(VolumeObject vol) {
16-
// TODO Auto-generated method stub
17-
return false;
18-
}
19-
2014
@Override
2115
public boolean deleteVolume(VolumeObject vo) {
2216
// TODO Auto-generated method stub
@@ -77,4 +71,10 @@ public void createVolumeFromBaseImageAsync(VolumeObject volume, TemplateOnPrimar
7771

7872
}
7973

74+
@Override
75+
public void createVolumeAsync(VolumeObject vol, AsyncCompletionCallback<CommandResult> callback) {
76+
// TODO Auto-generated method stub
77+
78+
}
79+
8080
}

0 commit comments

Comments
 (0)