Skip to content

A fast, simple persistent queue written in Java

License

Notifications You must be signed in to change notification settings

tuannh982/ladder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ladder

GitHub Total Alerts Code Quality: Java

Introduction

Ladder is a lightning fast persistent queue written in Java.

Usage

Installation

// TODO publish to Maven Central

Create persistent queue instance

String path = "/path/to/your/queue/dir";
        Queue queue = new LadderQueue(
        new File(path),
        LadderQueueOptions.builder()
        .dataFlushThreshold(512 * 1024)
        .maxFileSize(100 * 1024)
        .build()
);

Basic operations

put

byte[] data = new byte[] {...};
queue.put(data);

take

byte[] read = queue.take();

poll

long timeoutInMs = 500;
byte[] read = queue.poll(timeoutInMs);

Releases

No releases published

Packages

No packages published

Languages