Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.2.1.3.0)

E80355-01

coherence/util/Versionable.hpp

00001 /*
00002 * Versionable.hpp
00003 *
00004 * Copyright (c) 2000, 2017, 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_VERSIONABLE_HPP
00017 #define COH_VERSIONABLE_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 COH_OPEN_NAMESPACE2(coherence,util)
00022 
00023 
00024 /**
00025 * An interface for versionable data.
00026 *
00027 * @author tb  2008.05.08
00028 */
00029 class COH_EXPORT Versionable
00030     : public interface_spec<Versionable>
00031     {
00032     // ----- Versionable interface ------------------------------------------
00033 
00034     public:
00035         /**
00036         * Get the version indicator for this object. The version indicator
00037         * should be an immutable object or one treated as an immutable, which
00038         * is to say that after the version is incremented, the previous version's
00039         * indicator reference will never be returned again.
00040         *
00041         * @return a non-null version value that implements the Comparable
00042         *         interface
00043         */
00044         virtual Comparable::View getVersionIndicator() const = 0;
00045 
00046         /**
00047         * Update the version to the next logical version indicator.
00048         *
00049         * @throws UnsupportedOperationException  if the object is immutable or
00050         *         if the object does not know how to increment its own version
00051         *         indicator
00052         */
00053         virtual void incrementVersion() = 0;
00054     };
00055 
00056 COH_CLOSE_NAMESPACE2
00057 
00058 #endif // COH_VERSIONABLE_HPP
00059 
Copyright © 2000, 2017, Oracle and/or its affiliates. All rights reserved.