Oracle Coherence for C++ API


UnitCalculator Class Reference

#include <coherence/net/cache/UnitCalculator.hpp>

Inherits Object.

List of all members.

Detailed Description

A unit calculator is an object that can calculate the cost of caching an object.

Used with LocalCache.

nsa 2008.06.23

Public Types

typedef spec::Handle Handle
 UnitCalculator Handle definition.
typedef spec::View View
 UnitCalculator View definition.
typedef spec::Holder Holder
 UnitCalculator Holder definition.

Public Member Functions

virtual size32_t calculateUnits (Object::View vKey, Object::View vValue) const =0
 Calculate a cache cost for the specified cache entry key and value.

Static Public Attributes

static const size32_t npos
 The largest possible value of type size32_t.

Member Function Documentation

virtual size32_t calculateUnits ( Object::View  vKey,
Object::View  vValue 
) const [pure virtual]

Calculate a cache cost for the specified cache entry key and value.

vKey the cache key to evaluate for unit cost
vValue the cache value to evaluate for unit cost
an integer value 0 or greater, with a larger value signifying a higher cost

The documentation for this class was generated from the following file:
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.