public abstract class NetStorageDriverBase<I extends com.emc.mongoose.api.model.item.Item,O extends com.emc.mongoose.api.model.io.task.IoTask<I>> extends com.emc.mongoose.storage.driver.base.StorageDriverBase<I,O> implements NetStorageDriver<I,O>, io.netty.channel.pool.ChannelPoolHandler
NetStorageDriver.Transport| Modifier and Type | Field and Description |
|---|---|
protected io.netty.bootstrap.Bootstrap |
bootstrap |
protected int |
connAttemptsLimit |
protected java.lang.String[] |
storageNodeAddrs |
protected int |
storageNodePort |
authTokens, childTasksQueue, concurrencyLevel, concurrencyThrottle, credential, requestAuthTokenFunc, requestNewPathFunc, stepId, verifyFlagATTR_KEY_IOTASK, IO_EXECUTOR_IMPLS, SOCKET_CHANNEL_IMPLS| Modifier | Constructor and Description |
|---|---|
protected |
NetStorageDriverBase(java.lang.String jobName,
com.emc.mongoose.api.model.data.DataInput contentSrc,
com.emc.mongoose.ui.config.load.LoadConfig loadConfig,
com.emc.mongoose.ui.config.storage.StorageConfig storageConfig,
boolean verifyFlag) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustIoBuffers(long avgTransferSize,
com.emc.mongoose.api.model.io.IoType ioType) |
protected void |
appendHandlers(io.netty.channel.ChannelPipeline pipeline) |
void |
channelAcquired(io.netty.channel.Channel channel) |
void |
channelCreated(io.netty.channel.Channel channel) |
void |
channelReleased(io.netty.channel.Channel channel) |
void |
complete(io.netty.channel.Channel channel,
O ioTask) |
protected NonBlockingConnPool |
createConnectionPool() |
protected void |
doClose() |
protected void |
doInterrupt() |
protected io.netty.channel.Channel |
getUnpooledConnection() |
protected abstract void |
sendRequest(io.netty.channel.Channel channel,
io.netty.channel.ChannelPromise channelPromise,
O ioTask)
Note that the particular implementation should also invoke
the
sendRequestData(Channel, IoTask) method to send the actual payload (if any). |
protected void |
sendRequestData(io.netty.channel.Channel channel,
O ioTask) |
protected int |
submit(java.util.List<O> ioTasks) |
protected int |
submit(java.util.List<O> ioTasks,
int from,
int to) |
protected boolean |
submit(O ioTask) |
await, doShutdown, get, getActiveTaskCount, getAll, getCompletedTaskCount, getConcurrencyLevel, getInput, getScheduledTaskCount, ioTaskCompleted, isIdle, put, put, put, requestNewAuthToken, requestNewPath, skip, toStringawait, close, closeAll, doStart, getState, getSvcCoroutines, interrupt, isClosed, isInterrupted, isShutdown, isStarted, setThreadCount, shutdown, startclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitget, getActiveTaskCount, getCompletedTaskCount, getConcurrencyLevel, getScheduledTaskCount, isIdle, list, resetprotected final java.lang.String[] storageNodeAddrs
protected final io.netty.bootstrap.Bootstrap bootstrap
protected final int storageNodePort
protected final int connAttemptsLimit
protected NetStorageDriverBase(java.lang.String jobName,
com.emc.mongoose.api.model.data.DataInput contentSrc,
com.emc.mongoose.ui.config.load.LoadConfig loadConfig,
com.emc.mongoose.ui.config.storage.StorageConfig storageConfig,
boolean verifyFlag)
throws com.emc.mongoose.api.common.exception.UserShootHisFootException,
java.lang.InterruptedException
com.emc.mongoose.api.common.exception.UserShootHisFootExceptionjava.lang.InterruptedExceptionprotected NonBlockingConnPool createConnectionPool()
public final void adjustIoBuffers(long avgTransferSize,
com.emc.mongoose.api.model.io.IoType ioType)
protected io.netty.channel.Channel getUnpooledConnection()
throws java.net.ConnectException,
java.lang.InterruptedException
java.net.ConnectExceptionjava.lang.InterruptedExceptionprotected boolean submit(O ioTask) throws java.lang.IllegalStateException
protected int submit(java.util.List<O> ioTasks, int from, int to) throws java.lang.IllegalStateException
protected final int submit(java.util.List<O> ioTasks) throws java.lang.IllegalStateException
protected abstract void sendRequest(io.netty.channel.Channel channel,
io.netty.channel.ChannelPromise channelPromise,
O ioTask)
sendRequestData(Channel, IoTask) method to send the actual payload (if any).channel - the channel to send request tochannelPromise - the promise which will be invoked when the request is sent completelyioTask - the I/O task describing the item and the operation to performprotected final void sendRequestData(io.netty.channel.Channel channel,
O ioTask)
throws java.io.IOException
java.io.IOExceptionpublic void complete(io.netty.channel.Channel channel,
O ioTask)
complete in interface NetStorageDriver<I extends com.emc.mongoose.api.model.item.Item,O extends com.emc.mongoose.api.model.io.task.IoTask<I>>public final void channelReleased(io.netty.channel.Channel channel)
throws java.lang.Exception
channelReleased in interface io.netty.channel.pool.ChannelPoolHandlerjava.lang.Exceptionpublic final void channelAcquired(io.netty.channel.Channel channel)
throws java.lang.Exception
channelAcquired in interface io.netty.channel.pool.ChannelPoolHandlerjava.lang.Exceptionpublic final void channelCreated(io.netty.channel.Channel channel)
throws java.lang.Exception
channelCreated in interface io.netty.channel.pool.ChannelPoolHandlerjava.lang.Exceptionprotected void appendHandlers(io.netty.channel.ChannelPipeline pipeline)
protected final void doInterrupt()
throws java.lang.IllegalStateException
protected void doClose()
throws java.lang.IllegalStateException,
java.io.IOException