mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-03 13:30:34 +07:00
Created Adapter#self(EventExecutor,FileHandle) to return instant handle reference
This commit is contained in:
parent
ffad38ad76
commit
264a7a9630
@ -18,6 +18,10 @@ public abstract class Adapter<F extends FileHandle> {
|
||||
return type;
|
||||
}
|
||||
|
||||
public Future<? extends F> self(EventExecutor executor, F handle) {
|
||||
return executor.newSucceededFuture(handle);
|
||||
}
|
||||
|
||||
public abstract int defaultBufferSize(F handle);
|
||||
public abstract Future<InputStream> stream(EventExecutor executor, F handle, int bufferSize);
|
||||
public abstract Future<ByteBuf> buffer(EventExecutor executor, F handle, int offset, int length);
|
||||
|
@ -21,7 +21,7 @@ public class MusicLoader extends AssetLoader<Music> {
|
||||
F handle,
|
||||
Adapter<F> adapter
|
||||
) {
|
||||
return super.ioAsync(executor, assets, asset, handle, adapter);
|
||||
return adapter.self(executor, handle);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user