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

com.bigdata.relation.accesspath.FlushBufferTask Maven / Gradle / Ivy

package com.bigdata.relation.accesspath;

import java.util.concurrent.Callable;

import com.bigdata.relation.rule.eval.ISolution;

/**
 * Task invokes {@link IBuffer#flush()} and returns its return value.
 * 
 * @author Bryan Thompson
 * @version $Id$
 */
public class FlushBufferTask implements Callable {
    
    final private IBuffer buffer;
    
    public FlushBufferTask(IBuffer buffer) {

        if (buffer == null)
            throw new IllegalArgumentException();

        this.buffer = buffer;
        
    }
    
    /**
     * @return The mutation count from {@link IBuffer#flush()}.
     */
    public Long call() {
        
        return buffer.flush();
        
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy