org.yamcs.cfdp.FileDownloadRequests Maven / Gradle / Ivy
package org.yamcs.cfdp;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* Only mapping a transaction ID to a download bucket at the moment
*/
public class FileDownloadRequests {
private Map buckets = new HashMap<>();
public synchronized void addTransfer(CfdpTransactionId transactionId, String bucket) {
buckets.put(transactionId, bucket);
}
public synchronized String removeTransfer(CfdpTransactionId transactionId) {
return buckets.remove(transactionId);
}
public synchronized Map getBuckets() {
return Collections.unmodifiableMap(buckets);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy