List of usage examples for java.util Collections synchronizedList
public static <T> List<T> synchronizedList(List<T> list)
From source file:org.globus.util.Tail.java
public Tail() { buffer = new byte[CHUNK_SIZE]; list = Collections.synchronizedList(new LinkedList()); }
From source file:org.goko.core.common.buffer.ByteCommandBuffer.java
public ByteCommandBuffer(Byte commandDelimiter) { this.stackedCommands = Collections.synchronizedList(new ArrayList<List<Byte>>()); this.currentCommand = Collections.synchronizedList(new ArrayList<Byte>()); this.commandDelimiter = commandDelimiter; }
From source file:org.trustedanalytics.routermetrics.nats.NatsGorouterAddressRetriever.java
public NatsGorouterAddressRetriever(Nats nats) { this.addresses = Collections.synchronizedList(new ArrayList<>()); this.mapper = new ObjectMapper(); nats.subscribe(NATS_ROUTER_REGISTER, this::onMessageArrived); nats.publish(NATS_ROUTER_GREET, "", NATS_ROUTER_REGISTER); }
From source file:org.quickserver.util.pool.MakeQSObjectPool.java
protected void setObjectPool(ObjectPool objectPool) { this.objectPool = objectPool; list = Collections.synchronizedList(new LinkedList()); }
From source file:dev.maisentito.suca.commands.TimerCommandHandler.java
public TimerCommandHandler(Bundle globals) { super(globals); mTimer = new Timer(TimerCommandHandler.class.getSimpleName()); mTasks = Collections.synchronizedList(new LinkedList<UserTimer>()); }
From source file:interactivespaces.service.comm.twitter.internal.twitter4j.Twitter4jTwitterConnectionService.java
/** * Construct a new twitter service. */ public Twitter4jTwitterConnectionService() { connections = Lists.newArrayList(); connections = Collections.synchronizedList(connections); }
From source file:org.deeplearning4j.clustering.cluster.ClusterSet.java
public ClusterSet(String distanceFunction, boolean inverse) { this.distanceFunction = distanceFunction; this.inverse = inverse; this.clusters = Collections.synchronizedList(new ArrayList<Cluster>()); this.pointDistribution = Collections.synchronizedMap(new HashMap<String, String>()); }
From source file:org.goko.core.common.event.EventDispatcher.java
/** * Constructor */ public EventDispatcher() { listenerList = Collections.synchronizedList(new ArrayList<Object>()); }
From source file:org.goko.log.ui.ApplicativeLogListenerService.java
/** * Constructor/*from w w w. ja va2 s. co m*/ */ public ApplicativeLogListenerService() { listeners = Collections.synchronizedList(new ArrayList<IApplicativeLogListener>()); events = Collections.synchronizedList(new ArrayList<ApplicativeLogEvent>()); }
From source file:org.pieshare.piespring.service.fileListenerService.ApacheFileWatcherService.java
public void init() { this.fileMonitors = new ArrayList(); this.modifiedFiles = Collections.synchronizedList(new ArrayList<PieFilder>()); }