Collage  1.4.0
High-performance C++ library for developing object-oriented distributed applications.
global.h
1 
2 /* Copyright (c) 2005-2013, Stefan Eilemann <eile@equalizergraphics.com>
3  *
4  * This file is part of Collage <https://github.com/Eyescale/Collage>
5  *
6  * This library is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License version 2.1 as published
8  * by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef CO_GLOBAL_H
21 #define CO_GLOBAL_H
22 
23 #include <co/api.h>
24 #include <co/types.h>
25 #include <string>
26 
27 namespace co
28 {
30  class Global
31  {
32  public:
34  CO_API static void setDefaultPort( const uint16_t port );
35 
37  CO_API static uint16_t getDefaultPort();
38 
49  CO_API static void setObjectBufferSize( const uint32_t size );
50 
55  CO_API static uint32_t getObjectBufferSize();
56 
69  CO_API static bool fromString( const std::string& data );
70 
72  CO_API static void toString( std::string& data );
73 
75  CO_API static pression::PluginRegistry& getPluginRegistry();
76 
79  // Note: also update string array initialization in global.cpp
82  {
83  IATTR_INSTANCE_CACHE_SIZE,
84 
85  IATTR_NODE_SEND_QUEUE_SIZE,
86  IATTR_NODE_SEND_QUEUE_AGE,
87  IATTR_RSP_ACK_TIMEOUT,
88  IATTR_RSP_ERROR_DOWNSCALE,
89  IATTR_RSP_ERROR_UPSCALE,
90  IATTR_RSP_ERROR_MAXSCALE,
91  IATTR_RSP_MIN_SENDRATE_SHIFT,
92  IATTR_RSP_NUM_BUFFERS,
93  IATTR_RSP_ACK_FREQUENCY,
94  IATTR_UDP_MTU,
95  IATTR_UDP_BUFFER_SIZE,
96  IATTR_TILE_QUEUE_MIN_SIZE,
97  IATTR_TILE_QUEUE_REFILL,
98  IATTR_RDMA_RING_BUFFER_SIZE_MB,
99  IATTR_RDMA_SEND_QUEUE_DEPTH,
100  IATTR_RDMA_RESOLVE_TIMEOUT_MS,
101  IATTR_ROBUSTNESS,
102  IATTR_TIMEOUT_DEFAULT,
103  IATTR_OBJECT_COMPRESSION,
104  IATTR_CMD_QUEUE_LIMIT,
105  IATTR_ALL
106  };
107 
109  CO_API static void setIAttribute( const IAttribute attr,
110  const int32_t value );
111 
113  CO_API static int32_t getIAttribute( const IAttribute attr );
114 
116  CO_API static uint32_t getTimeout();
118 
120  CO_API static uint32_t getKeepaliveTimeout();
121 
123  CO_API static size_t getCommandQueueLimit();
125  };
126 }
127 
128 #endif // CO_GLOBAL_H
Defines export visibility macros for library Collage.
IAttribute
Global integer attributes.
Definition: global.h:81
static CO_API uint16_t getDefaultPort()
Global parameter handling for the Collage library.
Definition: global.h:30
static CO_API uint32_t getObjectBufferSize()
Object-oriented network library.
Definition: barrier.h:27
static CO_API void setObjectBufferSize(const uint32_t size)
Set the minimum buffer size for Object serialization.
static CO_API pression::PluginRegistry & getPluginRegistry()
static CO_API void setDefaultPort(const uint16_t port)
Set the default listening port.