| synopsis || arguments || prev || next |

kdu_cache::attach_to

Java: Kdu_cache::Attach_to

void attach_to( kdu_cache * existing)

Java: void Attach_to( Kdu_cache existing)

[Declared in "../apps/compressed_io/kdu_cache.h"]

Go to class description.


Synopsis

This function may be called to attach the cache object to another existing cache object. Once attached, all attempts to access the contents of the cache will actually access the contents of the existing cache. While attached, you may not use the add_to_databin function or any member function which modifies the cache contents, or their auxiliary information (list order and mark status), since the object has no cache elements of its own. In this mode, the existing object's acquire_lock and release_lock function will be used instead of the present object's synchronization functions, wherever synchronization is required.

To detach the cache, you must call close, after which the object will be able to perform as an autonomous cache.

Automatically closes the present cache object if it has been used prior to calling this function.


Arguments

existing [kdu_cache *]


| top || synopsis || arguments || prev || next |