#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "hyport.h"
#include "zipsup.h"
#include "hypool.h"
#include "hymutex.h"
Functions | |
BOOLEAN | zipCachePool_addCache (HyZipCachePool *zcp, HyZipCache *zipCache) |
Add a new cache to the pool with reference count of 1. | |
BOOLEAN | zipCachePool_addRef (HyZipCachePool *zcp, HyZipCache *zipCache) |
Increment the reference count of a cache in the pool. | |
HyZipCache * | zipCachePool_findCache (HyZipCachePool *zcp, char const *zipFileName, IDATA zipFileNameLength, IDATA zipFileSize, I_64 zipTimeStamp) |
Scans the pool for a cache with matching zipFileName, zipFileSize and zipTimeStamp. | |
void | zipCachePool_kill (HyZipCachePool *zcp) |
Deletes a pool containing shareable zip caches. | |
HyZipCachePool * | zipCachePool_new (HyPortLibrary *portLib) |
Creates a pool to hold shareable zip caches with their reference counts. | |
BOOLEAN | zipCachePool_release (HyZipCachePool *zcp, HyZipCache *zipCache) |
Decrements the reference count of a cache in the pool. |
BOOLEAN zipCachePool_addCache | ( | HyZipCachePool * | zcp, | |
HyZipCache * | zipCache | |||
) |
Add a new cache to the pool with reference count of 1.
When reference count reaches zero the pool will automatically be freed.
[in] | zcp | the zip cache pool that is being added to. |
[in] | zipCache | the zip cache being added. |
BOOLEAN zipCachePool_addRef | ( | HyZipCachePool * | zcp, | |
HyZipCache * | zipCache | |||
) |
Increment the reference count of a cache in the pool.
[in] | zcp | the zip cache pool that is being added to. |
[in] | zipCache | the zip cache being added. |
HyZipCache* zipCachePool_findCache | ( | HyZipCachePool * | zcp, | |
char const * | zipFileName, | |||
IDATA | zipFileNameLength, | |||
IDATA | zipFileSize, | |||
I_64 | zipTimeStamp | |||
) |
Scans the pool for a cache with matching zipFileName, zipFileSize and zipTimeStamp.
The reference count is incremented and the cache is returned if a match is found.
[in] | zcp | the zip cache pool to search |
[in] | zipFileName | the name to test for match |
[in] | zipFileNameLength | the length of zipFileName |
[in] | zipFileSize | the size to test for match |
[in] | zipTimeStamp | the time stamp to test for match |
NULL if no match is found.
void zipCachePool_kill | ( | HyZipCachePool * | zcp | ) |
Deletes a pool containing shareable zip caches.
[in] | zcp | the zip cache pool that is being deleted |
HyZipCachePool* zipCachePool_new | ( | HyPortLibrary * | portLib | ) |
Creates a pool to hold shareable zip caches with their reference counts.
This should be called once per VM.
[in] | portLib | the port library |
BOOLEAN zipCachePool_release | ( | HyZipCachePool * | zcp, | |
HyZipCache * | zipCache | |||
) |
Decrements the reference count of a cache in the pool.
If the reference count reaches 0, the cache is removed from the pool and zipCache_kill is called on it.
[in] | zcp | the zip cache pool |
[in] | zipCache | the zip cache whose count is being decremented. |
FALSE if the cache is still in the pool.
Genereated on Tue Dec 9 14:12:59 2008 by Doxygen.
(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.