2 * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.vpnservice.datastoreutils;
11 import java.util.concurrent.ConcurrentLinkedQueue;
13 public class JobQueue {
14 private ConcurrentLinkedQueue<JobEntry> waitingEntries;
15 private JobEntry executingEntry;
18 waitingEntries = new ConcurrentLinkedQueue<JobEntry>();
21 public void addEntry(JobEntry entry) {
22 waitingEntries.add(entry); // FIXME - Try/Catch.
25 public ConcurrentLinkedQueue<JobEntry> getWaitingEntries() {
26 return waitingEntries;
29 public JobEntry getExecutingEntry() {
30 return executingEntry;
33 public void setExecutingEntry(JobEntry executingEntry) {
34 this.executingEntry = executingEntry;