From ef1c7dbafc2e110787242baebeb47b8ebf053087 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Wed, 16 Dec 2015 10:21:00 -0500 Subject: [PATCH] Add missing license headers to packetcable-driver concurrent Change-Id: I164d0844e27149b9738909c5dc85fba95b3fa9c9 Signed-off-by: Thanh Ha --- .../java/org/pcmm/concurrent/IWorker.java | 14 ++++++++++--- .../java/org/pcmm/concurrent/IWorkerPool.java | 17 ++++++++++------ .../java/org/pcmm/concurrent/impl/Worker.java | 19 +++++++++++------- .../org/pcmm/concurrent/impl/WorkerPool.java | 20 +++++++++++++------ 4 files changed, 48 insertions(+), 22 deletions(-) diff --git a/packetcable-driver/src/main/java/org/pcmm/concurrent/IWorker.java b/packetcable-driver/src/main/java/org/pcmm/concurrent/IWorker.java index 1a89605..48f0dfd 100644 --- a/packetcable-driver/src/main/java/org/pcmm/concurrent/IWorker.java +++ b/packetcable-driver/src/main/java/org/pcmm/concurrent/IWorker.java @@ -1,21 +1,29 @@ +/* + * Copyright (c) 2014 Cable Television Laboratories, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + package org.pcmm.concurrent; import java.util.concurrent.Callable; /** - * + * */ public interface IWorker extends Runnable { /** * defines the task to be performed by this worker - * + * * @param c */ void task(Callable c); /** * defines wait time before start working on the task - * + * * @param t */ void shouldWait(int t); diff --git a/packetcable-driver/src/main/java/org/pcmm/concurrent/IWorkerPool.java b/packetcable-driver/src/main/java/org/pcmm/concurrent/IWorkerPool.java index e97cc21..480ec8e 100644 --- a/packetcable-driver/src/main/java/org/pcmm/concurrent/IWorkerPool.java +++ b/packetcable-driver/src/main/java/org/pcmm/concurrent/IWorkerPool.java @@ -1,12 +1,17 @@ -/** - * +/* + * Copyright (c) 2014 Cable Television Laboratories, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html */ + package org.pcmm.concurrent; import org.pcmm.base.IAdapter; /** - * + * */ public interface IWorkerPool extends IAdapter { // handles 32 workers @@ -14,7 +19,7 @@ public interface IWorkerPool extends IAdapter { /** * schedules a worker for beginning its task after t milliseconds. - * + * * @param worker * : the worker * @param t @@ -26,7 +31,7 @@ public interface IWorkerPool extends IAdapter { /** * schedules a worker for immediate execution. - * + * * @param worker * : the worker * @return the id of the worker (PID) to be used for killing the worker if @@ -36,7 +41,7 @@ public interface IWorkerPool extends IAdapter { /** * kills the worker with the specified pid - * + * * @param pid */ void sendKillSignal(int pid); diff --git a/packetcable-driver/src/main/java/org/pcmm/concurrent/impl/Worker.java b/packetcable-driver/src/main/java/org/pcmm/concurrent/impl/Worker.java index 1080692..00850ba 100644 --- a/packetcable-driver/src/main/java/org/pcmm/concurrent/impl/Worker.java +++ b/packetcable-driver/src/main/java/org/pcmm/concurrent/impl/Worker.java @@ -1,6 +1,11 @@ -/** - * +/* + * Copyright (c) 2014 Cable Television Laboratories, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html */ + package org.pcmm.concurrent.impl; import java.util.concurrent.Callable; @@ -10,7 +15,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * + * */ public class Worker implements IWorker { @@ -29,7 +34,7 @@ public class Worker implements IWorker { /* * (non-Javadoc) - * + * * @see java.lang.Runnable#run() */ @Override @@ -45,7 +50,7 @@ public class Worker implements IWorker { /* * (non-Javadoc) - * + * * @see org.pcmm.threading.IWorker#task(java.util.concurrent.Callable) */ @Override @@ -56,7 +61,7 @@ public class Worker implements IWorker { /* * (non-Javadoc) - * + * * @see org.pcmm.threading.IWorker#shouldWait(int) */ @Override @@ -67,7 +72,7 @@ public class Worker implements IWorker { /* * (non-Javadoc) - * + * * @see org.pcmm.threading.IWorker#done() */ @Override diff --git a/packetcable-driver/src/main/java/org/pcmm/concurrent/impl/WorkerPool.java b/packetcable-driver/src/main/java/org/pcmm/concurrent/impl/WorkerPool.java index b6fb429..9074303 100644 --- a/packetcable-driver/src/main/java/org/pcmm/concurrent/impl/WorkerPool.java +++ b/packetcable-driver/src/main/java/org/pcmm/concurrent/impl/WorkerPool.java @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2014 Cable Television Laboratories, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + package org.pcmm.concurrent.impl; import java.lang.ref.WeakReference; @@ -19,7 +27,7 @@ import org.slf4j.LoggerFactory; public class WorkerPool implements IWorkerPool { /** - * + * */ private Map> workersMap; @@ -38,7 +46,7 @@ public class WorkerPool implements IWorkerPool { /* * (non-Javadoc) - * + * * @see org.pcmm.threading.IWorkerPool#schedule(org.pcmm.threading.IWorker, * int) */ @@ -57,7 +65,7 @@ public class WorkerPool implements IWorkerPool { /* * (non-Javadoc) - * + * * @see * org.pcmm.concurrent.IWorkerPool#schedule(org.pcmm.concurrent.IWorker) */ @@ -68,7 +76,7 @@ public class WorkerPool implements IWorkerPool { /* * (non-Javadoc) - * + * * @see org.pcmm.concurrent.IWorkerPool#sendKillSignal(int) */ @Override @@ -90,7 +98,7 @@ public class WorkerPool implements IWorkerPool { /* * (non-Javadoc) - * + * * @see org.pcmm.threading.IWorkerPool#killAll() */ @Override @@ -109,7 +117,7 @@ public class WorkerPool implements IWorkerPool { /* * (non-Javadoc) - * + * * @see org.pcmm.threading.IWorkerPool#recycle() */ @Override -- 2.36.6