File tree Expand file tree Collapse file tree
eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime
core/protocol/grpc/consumer
eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020import org .apache .eventmesh .common .protocol .SubscriptionItem ;
2121
22- import java .util .LinkedList ;
22+ import java .util .ArrayList ;
2323import java .util .List ;
2424
2525public class Subscription {
2626
27- private List <SubscriptionItem > topicList = new LinkedList <>();
27+ private List <SubscriptionItem > topicList = new ArrayList <>();
2828
2929 public Subscription () {
3030 }
Original file line number Diff line number Diff line change 4141import org .apache .http .impl .client .CloseableHttpClient ;
4242import org .apache .http .impl .client .HttpClients ;
4343
44+ import java .util .ArrayList ;
4445import java .util .Iterator ;
45- import java .util .LinkedList ;
4646import java .util .List ;
4747import java .util .Optional ;
4848import java .util .concurrent .BlockingQueue ;
@@ -276,7 +276,7 @@ private void initThreadPool() {
276276 }
277277
278278 private void initHttpClientPool () {
279- httpClientPool = new LinkedList <>();
279+ httpClientPool = new ArrayList <>();
280280 int clientPool = RandomUtils .nextInt (MIN_LIMIT , MAX_LIMIT );
281281 for (int i = 0 ; i < clientPool ; i ++) {
282282 CloseableHttpClient client = HttpClients .createDefault ();
Original file line number Diff line number Diff line change 3232import java .util .Date ;
3333import java .util .HashSet ;
3434import java .util .Iterator ;
35- import java .util .LinkedList ;
3635import java .util .List ;
3736import java .util .Map ;
3837import java .util .Set ;
@@ -210,7 +209,7 @@ private void startClientCheck() {
210209 log .debug ("grpc client info check" );
211210 }
212211
213- final List <ConsumerGroupClient > clientList = new LinkedList <>();
212+ final List <ConsumerGroupClient > clientList = new ArrayList <>();
214213 clientTable .values ().forEach (clients -> {
215214 clientList .addAll (clients );
216215 });
Original file line number Diff line number Diff line change 3535import org .apache .commons .collections4 .CollectionUtils ;
3636
3737import java .nio .charset .StandardCharsets ;
38+ import java .util .ArrayList ;
3839import java .util .Collections ;
39- import java .util .LinkedList ;
4040import java .util .List ;
4141import java .util .concurrent .ConcurrentHashMap ;
4242
5656@ Slf4j
5757class CloudEventTCPSubClient extends TcpClient implements EventMeshTCPSubClient <CloudEvent > {
5858
59- private final List <SubscriptionItem > subscriptionItems = Collections .synchronizedList (new LinkedList <>());
59+ private final List <SubscriptionItem > subscriptionItems = Collections .synchronizedList (new ArrayList <>());
6060 private ReceiveMsgHook <CloudEvent > callback ;
6161
6262 public CloudEventTCPSubClient (EventMeshTCPClientConfig eventMeshTcpClientConfig ) {
Original file line number Diff line number Diff line change 3636
3737import org .apache .commons .collections4 .CollectionUtils ;
3838
39+ import java .util .ArrayList ;
3940import java .util .Collections ;
40- import java .util .LinkedList ;
4141import java .util .List ;
4242import java .util .concurrent .ConcurrentHashMap ;
4343
4848@ Slf4j
4949class EventMeshMessageTCPSubClient extends TcpClient implements EventMeshTCPSubClient <EventMeshMessage > {
5050
51- private final List <SubscriptionItem > subscriptionItems = Collections .synchronizedList (new LinkedList <>());
51+ private final List <SubscriptionItem > subscriptionItems = Collections .synchronizedList (new ArrayList <>());
5252 private ReceiveMsgHook <EventMeshMessage > callback ;
5353
5454 public EventMeshMessageTCPSubClient (EventMeshTCPClientConfig eventMeshTcpClientConfig ) {
You can’t perform that action at this time.
0 commit comments