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

com.moesif.sdk.okhttp3client.EventModelBuffer Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package com.moesif.sdk.okhttp3client;

import com.moesif.api.models.EventModel;

import java.util.ArrayList;
import java.util.List;

public class EventModelBuffer {
    private List buffer;
    private int maxSize;

    public EventModelBuffer(int maxSize) {
        this.maxSize = maxSize;
        init();
    }

    private void init(){
        buffer = new ArrayList();

    }

    public boolean isFull() {
        return buffer.size() >= this.maxSize;
    }

    public void add(EventModel loggedEvent) {
        buffer.add(loggedEvent);
    }

    public List empty(){
        List b = this.buffer;
        init();
        return b;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy