Examples of nextState()


Examples of org.jscsi.initiator.connection.Connection.nextState()

        if (blocks > 0) {

            if (LOGGER.isInfoEnabled()) {
                LOGGER.info("Now reading sequences of length " + blocks + " blocks.");
            }
            connection.nextState(new ReadRequestState(connection, dst, TaskAttributes.SIMPLE, (int) Math.min(bytes2Process, blocks * blockSize), startAddress, blocks));
            startAddress += blocks;
            totalBlocks -= blocks;
            bytes2Process -= blocks * blockSize;
        }

View Full Code Here

Examples of org.jscsi.initiator.connection.Connection.nextState()

            if (LOGGER.isInfoEnabled()) {
                LOGGER.info("Now reading sequences of length " + blocks + " blocks.");
            }

            connection.nextState(new ReadRequestState(connection, dst, TaskAttributes.SIMPLE, (int) Math.min(bytes2Process, blocks * blockSize), startAddress, blocks));
            startAddress += blocks;
            totalBlocks -= blocks;
            blocks = (short) Math.min(READ_THIRD_STAGE_BLOCKS, totalBlocks);
        }
        return true;
View Full Code Here

Examples of org.jscsi.initiator.connection.Connection.nextState()

        if (LOGGER.isInfoEnabled()) {
            LOGGER.info("Now sending sequences of length " + blocks + " blocks.");
        }

        int expectedDataTransferLength = (int) Math.min(bytes2Process, blocks * blockSize);
        connection.nextState(new WriteRequestState(connection, src, bufferPosition, TaskAttributes.SIMPLE, expectedDataTransferLength, startAddress, blocks));
        startAddress += blocks;
        totalBlocks -= blocks;
        bytes2Process -= blocks * blockSize;
        bufferPosition += expectedDataTransferLength;

View Full Code Here

Examples of org.jscsi.initiator.connection.Connection.nextState()

                LOGGER.info("Now sending sequences of length " + blocks + " blocks.");
                LOGGER.info("Remaining, DataSegmentLength: " + bytes2Process + ", " + expectedDataTransferLength);
            }

            expectedDataTransferLength = (int) Math.min(bytes2Process, blocks * blockSize);
            connection.nextState(new WriteRequestState(connection, src, bufferPosition, TaskAttributes.SIMPLE, expectedDataTransferLength, startAddress, blocks));
            startAddress += blocks;
            totalBlocks -= blocks;
            bytes2Process -= blocks * blockSize;
            bufferPosition += expectedDataTransferLength;
        }
View Full Code Here

Examples of org.jscsi.initiator.connection.Connection.nextState()

            if (LOGGER.isInfoEnabled()) {
                LOGGER.info("Now sending sequences of length " + blocks + " blocks.");
            }

            expectedDataTransferLength = (int) Math.min(bytes2Process, blocks * blockSize);
            connection.nextState(new WriteRequestState(connection, src, bufferPosition, TaskAttributes.SIMPLE, expectedDataTransferLength, startAddress, blocks));
            startAddress += blocks;
            totalBlocks -= blocks;
            blocks = (short) Math.min(READ_THIRD_STAGE_BLOCKS, totalBlocks);
            bufferPosition += expectedDataTransferLength;
        }
View Full Code Here

Examples of org.jscsi.initiator.connection.Connection.nextState()

        if (capacityInformation == null) { throw new NullPointerException(); }

        final Connection connection = session.getNextFreeConnection();
        if (connection == null) { throw new NullPointerException(); }

        connection.nextState(new CapacityRequestState(connection, capacityInformation, TaskAttributes.SIMPLE));
        session.releaseUsedConnection(connection);
        return true;
    }

    // --------------------------------------------------------------------------
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.