******************************************************************************/
-package org.onap.dmaap.datarouter.node;
+package org.onap.dmaap.datarouter.node.delivery;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import java.util.HashMap;
import java.util.List;
import org.jetbrains.annotations.Nullable;
+import org.onap.dmaap.datarouter.node.DestInfo;
+import org.onap.dmaap.datarouter.node.log.StatusLog;
/**
* Mechanism for monitoring and controlling delivery of files to a destination.
/**
* Create a delivery queue for a given destination info.
*/
- DeliveryQueue(DeliveryQueueHelper deliveryQueueHelper, DestInfo destinationInfo) {
+ public DeliveryQueue(DeliveryQueueHelper deliveryQueueHelper, DestInfo destinationInfo) {
this.deliveryQueueHelper = deliveryQueueHelper;
this.destinationInfo = destinationInfo;
dir = new File(destinationInfo.getSpool());
*
* @return The length of the task in bytes or 0 if the task cannot be cancelled.
*/
- synchronized long cancelTask(String pubid) {
+ public synchronized long cancelTask(String pubid) {
if (working.get(pubid) != null) {
return (0);
}
/**
* Get the next task.
*/
- synchronized DeliveryTask getNext() {
+ public synchronized DeliveryTask getNext() {
DeliveryTask ret = peekNext();
if (ret != null) {
todoindex++;
/**
* Peek at the next task.
*/
- synchronized DeliveryTask peekNext() {
+ public synchronized DeliveryTask peekNext() {
long now = System.currentTimeMillis();
long mindate = now - deliveryQueueHelper.getExpirationTimer();
if (failed) {
/**
* Reset the retry timer.
*/
- void resetQueue() {
+ public void resetQueue() {
resumetime = System.currentTimeMillis();
}
/**
* Get task if in queue and mark as success.
*/
- boolean markTaskSuccess(String pubId) {
+ public boolean markTaskSuccess(String pubId) {
DeliveryTask task = working.get(pubId);
if (task != null) {
markSuccess(task);