From 18f9092fe0c52396dbc1d7978533ab1d8c61f76b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Thu, 10 May 2012 14:57:25 +0200 Subject: Add missing class RpcList. --- same/src/main/java/com/orbekk/util/RpcList.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 same/src/main/java/com/orbekk/util/RpcList.java (limited to 'same/src/main') diff --git a/same/src/main/java/com/orbekk/util/RpcList.java b/same/src/main/java/com/orbekk/util/RpcList.java new file mode 100644 index 0000000..10eecc1 --- /dev/null +++ b/same/src/main/java/com/orbekk/util/RpcList.java @@ -0,0 +1,21 @@ +package com.orbekk.util; + +import java.util.ArrayList; +import java.util.List; + +import com.orbekk.protobuf.Rpc; + +public class RpcList { + private List rpcs = new ArrayList(); + + public synchronized void add(Rpc rpc) { + rpcs.add(rpc); + } + + public synchronized void awaitAll() throws InterruptedException { + for (Rpc rpc : rpcs) { + rpc.await(); + } + rpcs.clear(); + } +} -- cgit v1.2.3