APISonar


org.apache.ignite.internal.processors.cache.persistence.wal.io.SimpleFileInput.io

> org > apache > ignite > internal > processors > cache > persistence > wal > io > SimpleFileInput > io
org APIs apache APIs ignite APIs internal APIs processors APIs cache APIs persistence APIs wal APIs io APIs SimpleFileInput APIs io APIs

Example 1
private SimpleFileInput fileInput;

    private void toggleOneRandomBit(int rangeFrom, int rangeTo) throws IOException {
        int pos = ThreadLocalRandom.current().nextInt(rangeFrom, rangeTo);
        fileInput.io().position(pos);

        byte[] buf = new byte[1];

        fileInput.io().readFully(buf, 0, 1);

        buf[0] ^= (1 << 3);

        fileInput.io().position(pos);
        fileInput.io().writeFully(buf, 0, 1);
        fileInput.io().force();
    }
Example 2
private SimpleFileInput fileInput;

    public void tearDown() throws Exception {
        fileInput.io().close();
        expBuf.close();
    }
Example 3
private SimpleFileInput fileInput;

    private void checkIntegrity() throws Exception {
        fileInput.io().position(0);

        for (int i = 0; i < 1024 / 16; i++) {
            try(FileInput.Crc32CheckingFileInput in = fileInput.startRead(false)) {
                in.readInt();
                in.readInt();
                in.readInt();
            }
        }
    }