All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.urbanairship.connect.client.offsets.InMemOffsetManager Maven / Gradle / Ivy

There is a newer version: 5.4.2
Show newest version
/*
Copyright 2015 Urban Airship and Contributors
*/

package com.urbanairship.connect.client.offsets;

import com.google.common.base.Optional;

import java.util.concurrent.atomic.AtomicReference;

public class InMemOffsetManager implements OffsetManager {

    private final AtomicReference offset = new AtomicReference<>(null);

    public InMemOffsetManager() {}

    @Override
    public Optional getLastOffset() {
        return Optional.fromNullable(offset.get());
    }

    @Override
    public void update(String offset) {
        this.offset.set(offset);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy