com.emc.mongoose.api.model.io.task.path.BasicPathIoTaskBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mongoose-api-model Show documentation
Show all versions of mongoose-api-model Show documentation
Mongoose is a high-load storage performance testing tool
package com.emc.mongoose.api.model.io.task.path;
import com.emc.mongoose.api.model.io.task.BasicIoTaskBuilder;
import com.emc.mongoose.api.model.item.PathItem;
import com.emc.mongoose.api.model.storage.Credential;
import java.io.IOException;
import java.util.List;
/**
Created by kurila on 30.01.17.
*/
public class BasicPathIoTaskBuilder>
extends BasicIoTaskBuilder
implements PathIoTaskBuilder {
@Override @SuppressWarnings("unchecked")
public O getInstance(final I pathItem)
throws IOException {
final String uid;
return (O) new BasicPathIoTask<>(
originCode, ioType, pathItem,
Credential.getInstance(uid = getNextUid(), getNextSecret(uid))
);
}
@Override @SuppressWarnings("unchecked")
public void getInstances(final List items, final List buff)
throws IOException {
String uid;
for(final I nextItem : items) {
buff.add(
(O) new BasicPathIoTask<>(
originCode, ioType, nextItem,
Credential.getInstance(uid = getNextUid(), getNextSecret(uid))
)
);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy