Oracle Coherence for C++ API
Release 3.7.1.0
E22845-01
00001 /* 00002 * RequestTimeoutException.hpp 00003 * 00004 * Copyright (c) 2000, 2011, 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_REQUEST_TIMEOUT_EXCEPTION_HPP 00017 #define COH_REQUEST_TIMEOUT_EXCEPTION_HPP 00018 00019 #include "coherence/lang.ns" 00020 00021 #include "coherence/io/pof/PofReader.hpp" 00022 #include "coherence/io/pof/PofWriter.hpp" 00023 #include "coherence/io/pof/PortableException.hpp" 00024 00025 COH_OPEN_NAMESPACE2(coherence,net) 00026 00027 using coherence::io::pof::PofReader; 00028 using coherence::io::pof::PofWriter; 00029 using coherence::io::pof::PortableException; 00030 00031 /** 00032 * Signals that a request execution in a clustered environment did not 00033 * complete in a pre-determined amount of time. For some specific requests 00034 * this exception could carry a partial execution result. 00035 * 00036 * @author jh 2008.02.14 00037 */ 00038 class COH_EXPORT RequestTimeoutException 00039 : public throwable_spec<RequestTimeoutException, 00040 extends<PortableException> > 00041 { 00042 friend class factory<RequestTimeoutException>; 00043 00044 // ----- constructors --------------------------------------------------- 00045 00046 protected: 00047 /** 00048 * Create a RequestTimeoutException. 00049 * 00050 * @param vsMsg the detail message 00051 * @param vCause the underlying cause of the exception 00052 */ 00053 RequestTimeoutException(String::View vsMsg = String::null_string, 00054 Exception::View vCause = NULL); 00055 00056 00057 // ----- RequestTimeoutException interface ------------------------------ 00058 00059 public: 00060 /** 00061 * Return a partial execution result that may have been assembled 00062 * prior to the timeout. The result type is usually the same as the 00063 * type of the return value for the corresponding request. 00064 * 00065 * @return a partial execution result 00066 */ 00067 virtual Object::Holder getPartialResult() const; 00068 00069 /** 00070 * Specify a partial execution result. 00071 * 00072 * @param ohPartialResult a partial execution result 00073 */ 00074 virtual void setPartialResult(Object::Holder ohPartialResult); 00075 00076 00077 // ----- PortableObject interface --------------------------------------- 00078 00079 public: 00080 /** 00081 * {@inheritDoc} 00082 */ 00083 virtual void readExternal(PofReader::Handle hIn); 00084 00085 /** 00086 * {@inheritDoc} 00087 */ 00088 virtual void writeExternal(PofWriter::Handle hOut) const; 00089 00090 00091 // ----- data members --------------------------------------------------- 00092 00093 protected: 00094 /** 00095 * Partial execution result (optional). 00096 */ 00097 MemberHolder<Object> m_ohPartialResult; 00098 }; 00099 00100 COH_CLOSE_NAMESPACE2 00101 00102 #endif // COH_REQUEST_TIMEOUT_EXCEPTION_HPP