Package org.jscsi.initiator

Examples of org.jscsi.initiator.Initiator.closeSession()


        // Blocking until reads are concluded
        read1.get();
        read2.get();

        // closing the targets
        initiator.closeSession(target1);
        initiator.closeSession(target2);

        // correctness check
        if (!Arrays.equals(writeData1.array(), readData1.array()) || !Arrays.equals(writeData2.array(), readData2.array())) { throw new IllegalStateException("Data read must be equal to the data written"); }
    }
View Full Code Here


        read1.get();
        read2.get();

        // closing the targets
        initiator.closeSession(target1);
        initiator.closeSession(target2);

        // correctness check
        if (!Arrays.equals(writeData1.array(), readData1.array()) || !Arrays.equals(writeData2.array(), readData2.array())) { throw new IllegalStateException("Data read must be equal to the data written"); }
    }
}
View Full Code Here

        // reading the data single threaded
        initiator.read(target, readData, address, readData.capacity());

        // closing the session
        initiator.closeSession(target);

        // correctness check
        if (!Arrays.equals(writeData.array(), readData.array())) { throw new IllegalStateException("Data read must be equal to the data written"); }
    }
View Full Code Here

        String target = "testing-xen2-disk1";
        Initiator initiator = new Initiator(Configuration.create());
        // creating session, performing login on target
        initiator.createSession(target);
        // closing the session
        initiator.closeSession(target);
    }
}
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.