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

org.yamcs.cfdp.FileDownloadRequests Maven / Gradle / Ivy

There is a newer version: 5.10.9
Show newest version
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