Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Tin học văn phòng
Patterns in JavaTM, Volume 3 Java Enterprise Java Enterprise Design Patterns phần 6
Đang chuẩn bị liên kết để tải về tài liệu:
Patterns in JavaTM, Volume 3 Java Enterprise Java Enterprise Design Patterns phần 6
Minh Dân
51
50
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
còn sơ khai của phương pháp được gọi là nó tạo ra một kết nối mới. Điều này có thể thêm chi phí đáng kể cho các ứng dụng thực hiện cuộc gọi phương pháp từ xa thường xuyên. Nó có thể là một nút cổ chai giới hạn số lượng khách hàng một máy chủ có thể xử lý đồng thời. Ảo hóa các kết nối loại bỏ hầu hết các nguyên cần thiết cho. | 242 Chapter Six stub s method is called is that it creates a new connection. This can add significant overhead to applications that make frequent remote method calls. It can be a bottleneck that limits the number of clients a server can handle concurrently. Virtualizing the connections eliminates most of the overhead. First we will look at the Multiplexer class. public class Multiplexer private Socket actualsocket The actual connection. private DataOutputStream actualOut actual output stream private DataInputStream actualIn actual input stream private Hashtable socketTable key is connection id private ChunkBufferPool bufferPool ChunkBufferPool objects keep a collection of ChunkBuffer objects that are awaiting reuse. A Multiplexer object asks its ChunkBufferPool object for a ChunkBuffer object when it needs one. If the ChunkBufferPool object has any ChunkBuffer objects in its collection it takes one out of the collection and gives it to the Multiplexer object. If the ChunkBufferPool object does not have any ChunkBuffer objects in its collection then it creates a new one. When a ChunkBuffer object is no longer needed it is returned to the ChunkBufferPool object. This is an application of the Object Pool pattern described in Volume 1. private Queue connectionQueue new Queue When a Multiplexer object receives data associated with a new virtual connection it creates a Socket object and places it in a Queue object. It stays in the Queue until a call to the Multiplexer object s accept method takes it out of the Queue object and passes it to its caller. private ConnectionIDFactory idFactory This Multiplexer implementation delegates the creation of ConnectionID objects to a class called ConnectionIDFactory. private int connectionIDLength Multiplexer objects transmit ConnectionID objects as a sequence of bytes. The Multiplexer object on one end of an actual connection may create ConnectionID objects that are represented as a longer sequence of bytes than the other. This may
TÀI LIỆU LIÊN QUAN
THEWEB DESIGNER’S ROADMAP
Applied Java™ Patterns
Design Patterns Java™ Workbook
Design Patterns Fof Dummies
Design patterns
The head First Design Patterns
Children’s sewing patterns: 4 free Sewing patterns for kids
Price patterns of martin pring
PHP Objects, Patterns, and Practice
The Biology of Soil
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.