Package one.nio.serial

Examples of one.nio.serial.SerializerCollector


        }

        AsyncExecutor.fork(new ParallelTask() {
            @Override
            public void execute(int taskNum, int taskCount) throws IOException, ClassNotFoundException {
                SerializerCollector collector = new SerializerCollector(mmap.getAddr(), mmap.getSize());

                for (int i = taskNum; i < capacity; i += taskCount) {
                    long currentPtr = mapBase + (long) i * 8;
                    for (long entry; (entry = unsafe.getAddress(currentPtr)) != 0; currentPtr = entry + NEXT_OFFSET) {
                        collector.setOffset(entry + headerSize(entry));
                        serializer.read(collector);
                    }
                }

                synchronized (serializers) {
                    serializers.addAll(collector.serializers());
                }
            }
        });

        SerializeStream ss = new SerializeStream(mmap.getAddr() + CUSTOM_DATA_OFFSET, MAX_CUSTOM_DATA_SIZE);
View Full Code Here

TOP

Related Classes of one.nio.serial.SerializerCollector

Copyright © 2018 www.massapicom. 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.