00001 /* 00002 * Member.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_MEMBER_HPP 00017 #define COH_MEMBER_HPP 00018 00019 #include "coherence/lang.ns" 00020 00021 COH_OPEN_NAMESPACE2(coherence,net) 00022 00023 00024 /** 00025 * The Member interface represents a cluster member. 00026 * 00027 * @author jh 2007.12.20 00028 */ 00029 class COH_EXPORT Member 00030 : public interface_spec<Member> 00031 { 00032 // ----- Member interface ----------------------------------------------- 00033 00034 public: 00035 /** 00036 * Determine the configured name for the Site (such as a data center) 00037 * in which this Member resides. This name is used for logging 00038 * purposes and to differentiate among multiple geographic sites. 00039 * 00040 * @return the configured Site name or null 00041 */ 00042 virtual String::View getSiteName() const = 0; 00043 00044 /** 00045 * Determine the configured name for the Rack (such as a physical 00046 * rack, cage or blade frame) in which this Member resides. This name 00047 * is used for logging purposes and to differentiate among multiple 00048 * racks within a particular data center, for example. 00049 * 00050 * @return the configured Rack name or null 00051 */ 00052 virtual String::View getRackName() const = 0; 00053 00054 /** 00055 * Determine the configured name for the Machine (such as a host name) 00056 * in which this Member resides. This name is used for logging 00057 * purposes and to differentiate among multiple servers. 00058 * 00059 * @return the configured Machine name or null 00060 */ 00061 virtual String::View getMachineName() const = 0; 00062 00063 /** 00064 * Determine the configured name for the Process (such as a JVM) in 00065 * which this Member resides. This name is used for logging purposes 00066 * and to differentiate among multiple processes on a a single 00067 * machine. 00068 * 00069 * @return the configured Process name or null 00070 */ 00071 virtual String::View getProcessName() const = 0; 00072 00073 /** 00074 * Determine the configured name for the Member. This name is used for 00075 * logging purposes and to differentiate among Members running within 00076 * a particular process. 00077 * 00078 * @return the configured Member name or null 00079 */ 00080 virtual String::View getMemberName() const = 0; 00081 00082 /** 00083 * Determine the configured role name for the Member. This role is 00084 * completely definable by the application, and can be used to 00085 * determine what Members to use for specific purposes, such as to 00086 * send particular types of work to. 00087 * 00088 * @return the configured role name for the Member or null 00089 */ 00090 virtual String::View getRoleName() const = 0; 00091 }; 00092 00093 COH_CLOSE_NAMESPACE2 00094 00095 #endif // COH_MEMBER_HPP