Unconventional I/O library for Java
one-nio is a library for building high-performance Java servers. It exposes OS capabilities and selected JDK internal APIs to help high-load applications get the most out of the underlying system.
epoll_wait() and sendfile().DirectMemory, MappedFile, and high-performance off-heap hash tables.one-nio's fast I/O and serialization.one-nio provides a fast and compact serialization mechanism designed for high-throughput services and long-term schema evolution. It supports:
Serializable and Externalizable interfaces:readObject/writeObject are invoked when present; they may only call defaultReadObject/defaultWriteObject on the data stream.Externalizable.readExternal/writeExternal are fully supported.ArrayList/LinkedList, HashSet/TreeSet, HashMap/TreeMap) chosen by implemented interfaces.serialVersionUID is ignored by one-nio (safe to omit). The UID is derived from instance field names, types, and the field order.@Renamed are supported for classes and fields.Number↔Number, up/downcasts within a hierarchy, and via valueOf()/instance methods when present). If no rule applies, the field falls back to a default (0/null).Additional details: see the Serialization FAQ
A minimal example showing how to serialize and deserialize a simple object with a transient field:
…one-nio generates bytecode for serializers at runtime. Since version 2.2.0, it supports two generation modes:
The mode can be configured with the one.nio.serial.gen.mode system property:
No open issues yet, or sync has not completed.