1999-08-16 21:50:52 +00:00
|
|
|
/*
|
1999-11-22 20:25:35 +00:00
|
|
|
*******************************************************************************
|
|
|
|
* Copyright (C) 1997-1999, International Business Machines Corporation and *
|
|
|
|
* others. All Rights Reserved. *
|
|
|
|
*******************************************************************************
|
1999-08-16 21:50:52 +00:00
|
|
|
*/
|
|
|
|
//===============================================================================
|
|
|
|
//
|
|
|
|
// File colcache.cpp
|
|
|
|
//
|
|
|
|
// CollationCache implements a persistent in-memory cache for
|
|
|
|
// TableCollationData objects. The goal of CollationCache is to improve
|
|
|
|
// the memory footprint of a process which may have multiple threads
|
|
|
|
// loading up the same TableCollation object. Performance improvement is
|
|
|
|
// strictly a secondary goal.
|
|
|
|
//
|
|
|
|
// Created by: Alan Liu
|
|
|
|
//
|
|
|
|
// Modification History:
|
|
|
|
//
|
|
|
|
// Date Name Description
|
|
|
|
// 2/11/97 aliu Creation.
|
|
|
|
// 2/12/97 aliu Modified to work with TableCollationData.
|
|
|
|
//
|
|
|
|
//===============================================================================
|
|
|
|
|
|
|
|
#include "colcache.h"
|
|
|
|
#include "tcoldata.h"
|
2000-03-28 22:12:14 +00:00
|
|
|
#include "hash.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------
|
|
|
|
// CollationCache implementation
|
|
|
|
//--------------------------------------------------------------------------------
|
|
|
|
|
1999-11-16 01:05:10 +00:00
|
|
|
static void U_CALLCONV deleteTCD(void* TCD)
|
1999-08-16 21:50:52 +00:00
|
|
|
{
|
|
|
|
delete (TableCollationData*)TCD;
|
|
|
|
}
|
|
|
|
|
2000-03-30 04:30:20 +00:00
|
|
|
CollationCache::CollationCache() : fHashtable()
|
1999-08-16 21:50:52 +00:00
|
|
|
{
|
2000-03-30 04:30:20 +00:00
|
|
|
fHashtable.setValueDeleter(deleteTCD);
|
1999-08-16 21:50:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//eof
|