Skip to content

Package description

Andrei Pangin edited this page May 8, 2014 · 4 revisions

one.nio.async

Utility functions for asynchronous execution.

one.nio.cluster

A framework for clients that access a group of multiple service providers.
The sample implementation of HTTP cluster can be found under test/one/nio/cluster.

one.nio.gen

Utility functions to assist in dynamic bytecode generation using ASM framework.

one.nio.http

Simple but high performance HTTP server and client.

one.nio.lock

An alternative to ReentrantReadWriteLock with smaller memory consumption and a lock upgrade functionality.

one.nio.mem

A range of tools for managing off-heap memory.

  • DirectMemory: allows to allocate memory beyond Java Heap.
  • MappedFile: maps and unmaps files to RAM. Supports files larger than 2 GB.
  • Malloc: off-heap memory allocator that works in a given memory range.
  • MallocMT: a special version of Malloc for multi-threaded applications.
  • FixedSizeAllocator: exremely fast lock-free allocator that manages chunks of the fixed size.
  • LongHashSet, LongLongHashMap, LongObjectHashMap: off-heap lock-free hash tables with 64-bit keys.
  • OffheapMap: an abstraction for building general purpose off-heap hash tables.
  • SharedMemory*Map: a generic solution for caching data in shared memory or memory-mapped files.

one.nio.mgt

Simple API to register and unregister MXBeans. Built-in HTTP server for accessing JMX attributes remotely.

one.nio.net

Low level socket I/O API with its own native library.
Provides Java layer for Linux-specific networking primitives including epoll_wait(), sendfile() etc.
When running on a system different from Linux/x64, the library falls back to the standard Java implementation based on java.net and java.nio.

one.nio.os

Java wrappers around certain Linux system calls for memory, process and user management.

one.nio.pool

Contains a generic resource pool as well as the socket pool that may be used for implementing various network clients.

one.nio.rpc

RPC server and client that leverages main features of one-nio library: fast network I/O, serialization and class evolution support.
A sample remote cache server using one-nio RPC API can be found at test/one/nio/rpc.

one.nio.serial

Object serialization framework. While covering nearly all use cases that standard Java serialization does, one-nio is a way faster and produces much smaller binary representation.
Utilizes dynamic bytecode generation. Easily deals with private fields, objects that have no public constructor etc. without Reflection overhead.
Provides the powerful mechanism for resolving class evolution issues. Can also serialize almost any object to JSON.

one.nio.server

An extendable general-purpose implementation of TCP Server based on one-nio networking API.
Known to serve more than 100K requests per second.

one.nio.util

Some widely used high performance codecs and other utility functions, including

  • Base64 encoder/decoder;
  • UTF-8 encoder/decoder;
  • URL encoder/decoder;
  • ByteArrayBuilder (similar to StringBuilder but accumulates result in byte[] array).