
com.univocity.api.statistics.NoopDataTransfer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of univocity-common-api Show documentation
Show all versions of univocity-common-api Show documentation
univocity public API - Common classes and utilites
The newest version!
/*
* Copyright (c) 2013 Univocity Software Pty Ltd. All rights reserved.
* This file is subject to the terms and conditions defined in file
* 'LICENSE.txt', which is part of this source code package.
*/
package com.univocity.api.statistics;
/**
* A singleton {@link DataTransfer} that does nothing.
*
* @author Univocity Software Pty Ltd - [email protected]
*/
public final class NoopDataTransfer implements DataTransfer {
private NoopDataTransfer() {
}
/**
* The only instance available of a {@code NoopDataTransfer}
*/
public static final DataTransfer instance = new NoopDataTransfer();
/**
* Returns the singleton {@link #instance} of a {@code NoopDataTransfer} in generic-friendly way
*
* @param the source of data, where data is coming from
* @param the target of data, where data is being transferred into.
*
* @return the {@code NoopDataTransfer} singleton {@link #instance}
*/
public static final DataTransfer getInstance() {
return instance;
}
@Override
public final void started(Object source, long totalSize, Object target) {
}
@Override
public final void transferred(Object source, long transferred, Object target) {
}
@Override
public final void completed(Object source, Object target) {
}
@Override
public final void aborted(Object source, Object target, Exception error) {
}
@Override
public boolean isStarted() {
return false;
}
@Override
public boolean isRunning() {
return false;
}
@Override
public boolean isAborted() {
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy