public class TransferStatusTracker extends Object
An abstract base class for data transfers that uses an in-memory ConcurrentHashMap to keep track of data transfer status information.
Modifier and Type | Field and Description |
---|---|
protected ConcurrentHashMap<String,Product> |
currentProductTransfers |
Constructor and Description |
---|
TransferStatusTracker(Catalog catalog)
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
FileTransferStatus |
getCurrentFileTransfer() |
List<FileTransferStatus> |
getCurrentFileTransfers() |
double |
getPctTransferred(Product product) |
double |
getPctTransferred(Reference ref) |
boolean |
isTransferComplete(Product product) |
void |
removeProductTransferStatus(Product product) |
void |
transferringProduct(Product product) |
protected ConcurrentHashMap<String,Product> currentProductTransfers
public TransferStatusTracker(Catalog catalog)
Default Constructor
.catalog
- The Catalog interface handed to it by the File Manager. It
needs this object to look up reference information.public FileTransferStatus getCurrentFileTransfer()
public void transferringProduct(Product product)
public List<FileTransferStatus> getCurrentFileTransfers()
public double getPctTransferred(Product product)
public double getPctTransferred(Reference ref)
public void removeProductTransferStatus(Product product)
public boolean isTransferComplete(Product product)
Copyright © 1999–2017 Apache OODT. All rights reserved.