coherence/net/cache/KeyAssociation.hpp

00001 /*00002 * KeyAssociation.hpp00003 *00004 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.00005 *00006 * Oracle is a registered trademarks of Oracle Corporation and/or its00007 * affiliates.00008 *00009 * This software is the confidential and proprietary information of Oracle00010 * Corporation. You shall not disclose such confidential and proprietary00011 * information and shall use it only in accordance with the terms of the00012 * license agreement you entered into with Oracle.00013 *00014 * This notice may not be removed or altered.00015 */00016 #ifndef COH_KEY_ASSOCIATION_HPP00017 #define COH_KEY_ASSOCIATION_HPP00018
00019 #include "coherence/lang.ns"00020
00021 COH_OPEN_NAMESPACE3(coherence,net,cache)
00022
00023
00024 /**00025 * A KeyAssociation represents a key object that has a natural association00026 * with another key object.00027 *00028 * The key object and the associated key may refer to entries in the same or00029 * different caches.00030 *00031 * For example, the information provided by a key that implements00032 * <b>KeyAssociation</b> may be used to place the key into the same partition00033 * as its associated key.00034 *00035 * See KeyAssociatedFilter for an example of a distributed query that takes00036 * advantage of a custom KeyAssociation implementation to dramatically optimize00037 * its performance.00038 *00039 * @author gm 2009.03.1800040 */00041 class COH_EXPORT KeyAssociation00042 : public interface_spec<KeyAssociation>
00043 {
00044 // ----- KeyAssociation interface ---------------------------------------00045
00046 public:
00047 /**00048 * Determine the key object to which this key object is associated.00049 * The key object returned by this method is often referred to as a00050 * <i>host key</i>.00051 *00052 * @return the host key that for this key object, or <tt>NULL</tt> if00053 * this key has no association.00054 */00055virtual Object::View getAssociatedKey() const = 0;
00056 };
00057
00058 COH_CLOSE_NAMESPACE3
00059
00060 #endif // COH_KEY_ASSOCIATION_HPP