Know/Java

Netty ChannelGroup

Marine™ 2014. 1. 22. 14:12
반응형


http://netty.io/5.0/api/index.html


A thread-safe Set that contains open Channels and provides various bulk operations on them. Using ChannelGroup, you can categorize Channels into a meaningful group (e.g. on a per-service or per-state basis.) A closed Channel is automatically removed from the collection, so that you don't need to worry about the life cycle of the added Channel. A Channel can belong to more than one ChannelGroup.


ChannelGroup은 쓰레드 세이프하며 Channel을 Set에 관리하며 다양한 오퍼레이션을 제공한다.

ChannelGroup을 사용하면 의미있는 그룹들로 Channel들을 분류할수 있으며 끊긴 Channel들은 자동으로 Collection에서 삭제된다. 하여 추가된 Channel들의 라이프사이클에 관하여 걱정하지 않아도 된다.

하나의 채널은 여러개의 Channel 그룹에 속할수 있다.

반응형

'Know > Java' 카테고리의 다른 글

Selenium을 이용한 UI 테스트  (0) 2013.06.11
JDBC 동작 원리  (0) 2013.02.22
Java Troubleshooting Tool - VisualVM  (0) 2013.02.13
m2 eclipse 버전업시에 에러 ignore  (0) 2012.02.24
Eclipse ERD Plugin  (0) 2011.01.12