package com.test.distrib;
import java.io.PrintStream;
import java.util.*;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
public class FileDistributionStreamExchangeTask implements Runnable {
private static final String counterGrp = "edit-counters";
private static final String storeName1 = "wikipedia-stats1";
private static final String storeName2 = "wikipedia-stats2";
private static final String storeKey1 = "Hello1";
private static final String storeKey2 = "Hello2";
private static final PrintStream OUTPUT_STREAM = System.out;
private static final String counterName1 = "repeat-edits1";
private static final String counterName2 = "repeat-edits2";
private DistributionStreamWorker worker1;
private DistributionStreamWorker worker2;
private static final long limits = 2000;
private volatile DistributionStreamWorker cworker;
private volatile AtomicReferenceFieldUpdater<FileDistributionStreamExchangeTask, DistributionStreamWorker> storeCAS =
AtomicReferenceFieldUpdater.newUpdater(FileDistributionStreamExchangeTask.class,
DistributionStreamWorker.class,
"cworker");
public FileDistributionStreamExchangeTask() {
init();
}
public void init() {
Map<String, Map<String, List<String>>> taskContext = new HashMap<>();
taskContext.put(storeName1, new HashMap<>());
taskContext.put(storeName2, new HashMap<>())