Skip to content

Repository files navigation

TARDIS4j

Java client for TARDIS

Usage

// Create a new client
var tardis = new TARDIS("http://localhost:1963");

// .getField is also fine but this returns a handy wrapper w/ incr & decr etc.
var field = tardis.getIntegerField("example:integer");
var otherField = tardis.getStringField("example:string");

var alice = Subject.of("example:person/alice");
var bob = Subject.of("example:person/bob");

// Get the value of a field
var value = field.value().getForSubject(alice); // shorthand for .asyncForSubject(...).get()

// Update a field alone
otherField.value("hello world!").forSubject(alice).apply();

// Update fields together in one event
tardis.sharedUpdate(
    field.increment().forSubject(alice),
    field.decrement().forSubject(bob)
).apply(); // .apply() shorthand for .applyAsync().join()

About

java client for tardis

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages