Menu

Evictor Pattern

For proxy, client connection can be released using following design pattern.
ACE introduces this pattern in "C++ Network programming V2" Chapter 3, 3.4

The Evictor Pattern requires every resources implements the Eviction Method(or by the wrapper method) if the resouce want to be managed by The evictor. The evictor obliged to maintain and decide when to evict a resource. The paper also introduces server methods to recycle evicted resouces:
1. deferred eviction : put evicted resource into a queue, then do the clear by strategy liek FIFO
2. recycle pool : put evicted resource into an object pool. Only clear the pool when it's full. The objects in the pool can be reused by assigning a new identity

Detail see Ref

Posted by bu jianjian 2012-06-17

Log in to post a comment.