
com.emc.mongoose.item.op.path.PathOperationsBuilderImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mongoose Show documentation
Show all versions of mongoose Show documentation
Mongoose is a high-load storage performance testing tool
The newest version!
package com.emc.mongoose.item.op.path;
import com.emc.mongoose.item.op.OperationsBuilderImpl;
import com.emc.mongoose.item.PathItem;
import com.emc.mongoose.storage.Credential;
import java.io.IOException;
import java.util.List;
/**
Created by kurila on 30.01.17.
*/
public class PathOperationsBuilderImpl>
extends OperationsBuilderImpl
implements PathOperationsBuilder {
public PathOperationsBuilderImpl(final int originIndex) {
super(originIndex);
}
@Override @SuppressWarnings("unchecked")
public O buildOp(final I pathItem)
throws IOException {
final String uid;
return (O) new PathOperationImpl<>(
originIndex, opType, pathItem,
Credential.getInstance(uid = getNextUid(), getNextSecret(uid))
);
}
@Override @SuppressWarnings("unchecked")
public void buildOps(final List items, final List buff)
throws IOException {
String uid;
for(final I nextItem : items) {
buff.add(
(O) new PathOperationImpl<>(
originIndex, opType, nextItem,
Credential.getInstance(uid = getNextUid(), getNextSecret(uid))
)
);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy