com.emc.mongoose.base.item.io.SingleItemInput Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mongoose-base Show documentation
Show all versions of mongoose-base Show documentation
Mongoose is a high-load storage performance testing tool
package com.emc.mongoose.base.item.io;
import com.emc.mongoose.base.item.Item;
import com.github.akurilov.commons.io.Input;
import java.util.List;
/** Created by andrey on 28.04.16. */
public class SingleItemInput implements Input {
private final T item;
public SingleItemInput(final T item) {
this.item = item;
}
@Override
public final T get() {
return item;
}
@Override
public final int get(final List buffer, final int limit) {
for (var i = 0; i < limit; i++) {
buffer.add(item);
}
return limit;
}
@Override
public final long skip(final long count) {
return count;
}
@Override
public final void reset() {}
@Override
public final void close() {}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy