Oracle Coherence for C++ API
Release 3.6.0.0
E15728-01

- Main Page
- Namespaces
- Classes
- Files

# coherence/net/cache/KeyAssociation.hpp

    00001 /*
    00002 * KeyAssociation.hpp
    00003 *
    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 its
    00007 * affiliates.
    00008 *
    00009 * This software is the confidential and proprietary information of Oracle
    00010 * Corporation. You shall not disclose such confidential and proprietary
    00011 * information and shall use it only in accordance with the terms of the
    00012 * license agreement you entered into with Oracle.
    00013 *
    00014 * This notice may not be removed or altered.
    00015 */
    00016 #ifndef COH_KEY_ASSOCIATION_HPP
    00017 #define COH_KEY_ASSOCIATION_HPP
    00018
    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 association
    00026 * with another key object.
    00027 *
    00028 * The key object and the associated key may refer to entries in the same or
    00029 * different caches.
    00030 *
    00031 * For example, the information provided by a key that implements
    00032 * <b>KeyAssociation</b> may be used to place the key into the same partition
    00033 * as its associated key.
    00034 *
    00035 * See KeyAssociatedFilter for an example of a distributed query that takes
    00036 * advantage of a custom KeyAssociation implementation to dramatically optimize
    00037 * its performance.
    00038 *
    00039 * @author gm  2009.03.18
    00040 */
    00041 class COH_EXPORT KeyAssociation
    00042     : 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 a
    00050         * <i>host key</i>.
    00051         *
    00052         * @return the host key that for this key object, or <tt>NULL</tt> if
    00053         *         this key has no association.
    00054         */
    00055         virtual Object::View getAssociatedKey() const = 0;
    00056     };
    00057
    00058 COH_CLOSE_NAMESPACE3
    00059
    00060 #endif // COH_KEY_ASSOCIATION_HPP

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.