Defines a strategy to be followed for cleaning up entries which are svc_handlers from a container. More...
#include <Cleanup_Strategies_T.h>


Public Member Functions | |
| virtual int | cleanup (CONTAINER &container, KEY *key, VALUE *value) |
| The method which will do the cleanup of the entry in the container. | |
Defines a strategy to be followed for cleaning up entries which are svc_handlers from a container.
The entry to be cleaned up is removed from the container. Here, since we are dealing with svc_handlers specifically, we perform a couple of extra operations.
Definition at line 112 of file Cleanup_Strategies_T.h.
| int ACE_Handler_Cleanup_Strategy< KEY, VALUE, CONTAINER >::cleanup | ( | CONTAINER & | container, | |
| KEY * | key, | |||
| VALUE * | value | |||
| ) | [virtual] |
The method which will do the cleanup of the entry in the container.
Reimplemented from ACE_Cleanup_Strategy< KEY, VALUE, CONTAINER >.
Definition at line 65 of file Cleanup_Strategies_T.cpp.
{
// Remove the item from cache only if the handler isnt in use.
if ((*value)->active () == 0)
{
(*value)->close ();
if (container.unbind (*key) == -1)
return -1;
}
return 0;
}
1.7.0