Commit | Line | Data |
---|---|---|
0b0fc881 ASL |
1 | /******************************************************************************* |
2 | * Copyright (c) 2009 Ericsson | |
3 | * | |
4 | * All rights reserved. This program and the accompanying materials are | |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.lttng.ui.views.common; | |
14 | ||
15 | /** | |
16 | * @author alvaro | |
17 | */ | |
18 | public class UiCommonFactory { | |
19 | // ======================================================================== | |
20 | // Data | |
21 | // ======================================================================== | |
22 | private static DataRequestQueue queue = null; | |
23 | ||
24 | ||
25 | ||
26 | // ======================================================================== | |
27 | // Methods | |
28 | // ======================================================================== | |
29 | ||
30 | /** | |
31 | * Needed when a queue is shared e.g. avoid multiple requests competing for | |
32 | * same resources | |
33 | * | |
34 | * @return | |
35 | */ | |
36 | public synchronized static DataRequestQueue getQueue() { | |
37 | if (queue == null) { | |
38 | queue = new DataRequestQueue(); | |
39 | } | |
40 | return queue; | |
41 | } | |
42 | } |