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

com.github.segmentio.safeclient.policy.flush.FlushAtSizePolicy Maven / Gradle / Ivy

package com.github.segmentio.safeclient.policy.flush;

import org.joda.time.DateTime;

public class FlushAtSizePolicy implements IFlushPolicy {

	private int threshold;
	
	public FlushAtSizePolicy(int threshold) {
		this.threshold = threshold;
	}
	
	public boolean shouldFlush(int queueSize, DateTime lastFlush) {
		return queueSize >= threshold;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy