Data Structures | Defines | Typedefs | Functions | Variables

P_ClusterInternal.h File Reference

A brief file description. More...

#include "P_ClusterCache.h"
Include dependency graph for P_ClusterInternal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CloseMessage
struct  MachineListMessage
struct  SetChanDataMessage
struct  SetChanPinMessage
struct  SetChanPriorityMessage
class  ClusterAccept

Defines

#define CLUSTER_THREAD_STEALING   1
#define CLUSTER_TOMCAT   1
#define CLUSTER_STATS   1
#define ALIGN_DOUBLE(_p)   ((((uintptr_t) (_p)) + 7) & ~7)
#define ALLOCA_DOUBLE(_sz)   ALIGN_DOUBLE(alloca((_sz) + 8))
#define MAX_TCOUNT   128
#define CONTROL_DATA   (128*1024)
#define READ_BANK_BUF_SIZE   DEFAULT_MAX_BUFFER_SIZE
#define READ_BANK_BUF_INDEX   (DEFAULT_BUFFER_SIZES-1)
#define ALLOC_DATA_MAGIC   0xA5
#define READ_LOCK_SPIN_COUNT   1
#define WRITE_LOCK_SPIN_COUNT   1
#define CLUSTER_BUCKETS   64
#define CLUSTER_PERIOD   HRTIME_MSECONDS(10)
#define CLUSTER_MAX_RUN_TIME   HRTIME_MSECONDS(100)
#define CLUSTER_MAX_THREAD_STEAL_TIME   HRTIME_MSECONDS(10)
#define MIN_CHANNELS   4096
#define MAX_CHANNELS   ((32*1024) - 1)
#define CLUSTER_CONTROL_CHANNEL   0
#define LAST_DEDICATED_CHANNEL   0
#define CLUSTER_PHASES   1
#define CLUSTER_INITIAL_PRIORITY   CLUSTER_PHASES
#define CLUSTER_BUMP_LENGTH   1
#define CLUSTER_MEMBER_DELAY   HRTIME_SECONDS(1)
#define CLUSTER_CONNECT_TIMEOUT   HRTIME_SECONDS(10)
#define CLUSTER_CONNECT_RETRY   HRTIME_MSECONDS(20)
#define CLUSTER_RETRY   HRTIME_MSECONDS(10)
#define CLUSTER_DELAY_BETWEEN_WRITES   HRTIME_MSECONDS(10)
#define CLUSTER_CHANNEL_INACTIVITY_TIMEOUT   (10 * HRTIME_SECONDS(60))
#define COMPLETION_CALLBACK_PERIOD   HRTIME_MSECONDS(10)
#define MAX_COMPLETION_CALLBACK_EVENTS   16
#define CLUSTER_ACTIVE   1
#define CLUSTER_NOT_ACTIVE   0
#define FORCE_CLOSE_ON_OPEN_CHANNEL   -2
#define MACHINE_CONFIG   0
#define CLUSTER_CONFIG   1
#define CL_NOTE   "cluster_note"
#define CL_WARN   "cluster_warn"
#define CL_PROTO   "cluster_proto"
#define CL_TRACE   "cluster_trace"
#define MAX_FAST_CONTROL_MESSAGE   504
#define SMALL_CONTROL_MESSAGE   MAX_FAST_CONTROL_MESSAGE
#define WRITE_MESSAGE_ALREADY_BUILT   -1
#define MAGIC_COUNT(_x)
#define DOUBLE_ALIGN(_x)   ((((uintptr_t)_x)+7)&~7)
#define MISS_TEST   0
#define TEST_PARTIAL_WRITES   0
#define TEST_PARTIAL_READS   0
#define TEST_TIMING   0
#define TEST_READ_LOCKS_MISSED   0
#define TEST_WRITE_LOCKS_MISSED   0
#define TEST_ENTER_EXIT   0
#define TEST_ENTER_EXIT   0
#define TTTEST(_x)
#define TTEST(_x)
#define TIMEOUT_TESTS(_x, _y)
#define TEST_READ_LOCK_MIGHT_FAIL   false
#define TEST_WRITE_LOCK_MIGHT_FAIL   false
#define enter_exit(_x, _y)
#define DOT_SEPARATED(_x)
#define CLUSTER_BUMP_NO_REMOVE   -1

Typedefs

typedef int(ClusterHandler::* ClusterContHandler )(int, void *)
typedef int(OutgoingControl::* OutgoingCtrlHandler )(int, void *)
typedef int(ClusterVConnection::* ClusterVConnHandler )(int, void *)

Functions

void SetHighBit (int *val)
void ClearHighBit (int *val)
int IsHighBitSet (int *val)
void cluster_set_priority (ClusterHandler *, ClusterVConnState *, int)
void cluster_lower_priority (ClusterHandler *, ClusterVConnState *)
void cluster_raise_priority (ClusterHandler *, ClusterVConnState *)
void cluster_schedule (ClusterHandler *, ClusterVConnection *, ClusterVConnState *)
void cluster_reschedule (ClusterHandler *, ClusterVConnection *, ClusterVConnState *)
void cluster_reschedule_offset (ClusterHandler *, ClusterVConnection *, ClusterVConnState *, int)
void cluster_disable (ClusterHandler *, ClusterVConnection *, ClusterVConnState *)
void cluster_update_priority (ClusterHandler *, ClusterVConnection *, ClusterVConnState *, int64_t, int64_t)
void cluster_bump (ClusterHandler *, ClusterVConnectionBase *, ClusterVConnState *, int)
IOBufferBlockclone_IOBufferBlockList (IOBufferBlock *, int, int, IOBufferBlock **)
IOBufferBlockconsume_IOBufferBlockList (IOBufferBlock *, int64_t)
int64_t bytes_IOBufferBlockList (IOBufferBlock *, int64_t)
void clusterVCAllocator_free (ClusterVConnection *vc)
int machine_config_change (const char *, RecDataT, RecData, void *)
void do_machine_config_change (void *, const char *)
void clusterAPI_init ()
void machine_online_APIcallout (int)
void machine_offline_APIcallout (int)

Variables

ClassAllocator
< ClusterVConnection
clusterVCAllocator
ClassAllocator
< ByteBankDescriptor
byteBankAllocator
int cluster_port

Detailed Description

A brief file description.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file P_ClusterInternal.h.


Define Documentation

#define ALIGN_DOUBLE (   _p  )     ((((uintptr_t) (_p)) + 7) & ~7)

Definition at line 42 of file P_ClusterInternal.h.

#define ALLOC_DATA_MAGIC   0xA5
#define ALLOCA_DOUBLE (   _sz  )     ALIGN_DOUBLE(alloca((_sz) + 8))

Definition at line 43 of file P_ClusterInternal.h.

#define CL_NOTE   "cluster_note"
#define CL_PROTO   "cluster_proto"
#define CL_TRACE   "cluster_trace"
#define CL_WARN   "cluster_warn"

Definition at line 119 of file P_ClusterInternal.h.

Referenced by ClusterHandler::build_initial_vector().

#define CLUSTER_ACTIVE   1

Definition at line 107 of file P_ClusterInternal.h.

#define CLUSTER_BUCKETS   64

Definition at line 62 of file P_ClusterInternal.h.

Referenced by cluster_reschedule_offset(), and ClusterHandler::process_write().

#define CLUSTER_BUMP_LENGTH   1

Definition at line 82 of file P_ClusterInternal.h.

#define CLUSTER_BUMP_NO_REMOVE   -1

Definition at line 496 of file P_ClusterInternal.h.

#define CLUSTER_CHANNEL_INACTIVITY_TIMEOUT   (10 * HRTIME_SECONDS(60))

Definition at line 99 of file P_ClusterInternal.h.

#define CLUSTER_CONFIG   1

Definition at line 115 of file P_ClusterInternal.h.

Referenced by machine_config_change(), and ClusterProcessor::start().

#define CLUSTER_CONNECT_RETRY   HRTIME_MSECONDS(20)

Definition at line 91 of file P_ClusterInternal.h.

Referenced by ClusterVConnection::start().

#define CLUSTER_CONNECT_TIMEOUT   HRTIME_SECONDS(10)

Definition at line 89 of file P_ClusterInternal.h.

#define CLUSTER_CONTROL_CHANNEL   0
#define CLUSTER_DELAY_BETWEEN_WRITES   HRTIME_MSECONDS(10)

Definition at line 93 of file P_ClusterInternal.h.

#define CLUSTER_INITIAL_PRIORITY   CLUSTER_PHASES

Definition at line 79 of file P_ClusterInternal.h.

#define CLUSTER_MAX_RUN_TIME   HRTIME_MSECONDS(100)

Definition at line 66 of file P_ClusterInternal.h.

Referenced by ClusterHandler::process_write().

#define CLUSTER_MAX_THREAD_STEAL_TIME   HRTIME_MSECONDS(10)

Definition at line 68 of file P_ClusterInternal.h.

Referenced by ClusterHandler::process_write().

#define CLUSTER_MEMBER_DELAY   HRTIME_SECONDS(1)
#define CLUSTER_NOT_ACTIVE   0

Definition at line 108 of file P_ClusterInternal.h.

#define CLUSTER_PERIOD   HRTIME_MSECONDS(10)

Definition at line 63 of file P_ClusterInternal.h.

Referenced by ClusterHandler::startClusterEvent().

#define CLUSTER_PHASES   1

Definition at line 77 of file P_ClusterInternal.h.

#define CLUSTER_RETRY   HRTIME_MSECONDS(10)

Definition at line 92 of file P_ClusterInternal.h.

#define CLUSTER_STATS   1
#define CLUSTER_THREAD_STEALING   1

Definition at line 37 of file P_ClusterInternal.h.

#define CLUSTER_TOMCAT   1

Definition at line 38 of file P_ClusterInternal.h.

#define COMPLETION_CALLBACK_PERIOD   HRTIME_MSECONDS(10)

Definition at line 103 of file P_ClusterInternal.h.

Referenced by ClusterHandler::startClusterEvent().

#define CONTROL_DATA   (128*1024)
#define DOT_SEPARATED (   _x  ) 
Value:
((unsigned char*)&(_x))[0], ((unsigned char*)&(_x))[1],   \
  ((unsigned char*)&(_x))[2], ((unsigned char*)&(_x))[3]

Definition at line 215 of file P_ClusterInternal.h.

#define DOUBLE_ALIGN (   _x  )     ((((uintptr_t)_x)+7)&~7)
#define enter_exit (   _x,
  _y 
)
#define FORCE_CLOSE_ON_OPEN_CHANNEL   -2

Definition at line 111 of file P_ClusterInternal.h.

Referenced by ClusterHandler::close_ClusterVConnection().

#define LAST_DEDICATED_CHANNEL   0
#define MACHINE_CONFIG   0

Definition at line 114 of file P_ClusterInternal.h.

Referenced by machine_config_change(), and ClusterProcessor::start().

#define MAGIC_COUNT (   _x  ) 
Value:
(0xBADBAD ^ ~(uint32_t)_x.msg.count \
 ^ ~(uint32_t)_x.msg.descriptor_cksum \
 ^ ~(uint32_t)_x.msg.control_bytes_cksum \
 ^ ~(uint32_t)_x.msg.unused \
 ^ ~((uint32_t)_x.msg.control_bytes << 16) ^_x.sequence_number)

Definition at line 131 of file P_ClusterInternal.h.

Referenced by ClusterHandler::process_read(), and ClusterHandler::process_write().

#define MAX_CHANNELS   ((32*1024) - 1)

Definition at line 72 of file P_ClusterInternal.h.

Referenced by ClusterHandler::check_channel().

#define MAX_COMPLETION_CALLBACK_EVENTS   16

Definition at line 104 of file P_ClusterInternal.h.

Referenced by ClusterHandler::startClusterEvent().

#define MAX_FAST_CONTROL_MESSAGE   504

Definition at line 126 of file P_ClusterInternal.h.

Referenced by ClusterControl::fast_data().

#define MAX_TCOUNT   128
#define MIN_CHANNELS   4096

Definition at line 71 of file P_ClusterInternal.h.

#define MISS_TEST   0

Definition at line 143 of file P_ClusterInternal.h.

#define READ_BANK_BUF_INDEX   (DEFAULT_BUFFER_SIZES-1)

Definition at line 52 of file P_ClusterInternal.h.

#define READ_BANK_BUF_SIZE   DEFAULT_MAX_BUFFER_SIZE

Definition at line 51 of file P_ClusterInternal.h.

#define READ_LOCK_SPIN_COUNT   1
#define SMALL_CONTROL_MESSAGE   MAX_FAST_CONTROL_MESSAGE

Definition at line 127 of file P_ClusterInternal.h.

Referenced by ClusterHandler::build_controlmsg_descriptors().

#define TEST_ENTER_EXIT   0

Definition at line 150 of file P_ClusterInternal.h.

#define TEST_ENTER_EXIT   0

Definition at line 150 of file P_ClusterInternal.h.

#define TEST_PARTIAL_READS   0

Definition at line 145 of file P_ClusterInternal.h.

#define TEST_PARTIAL_WRITES   0

Definition at line 144 of file P_ClusterInternal.h.

#define TEST_READ_LOCK_MIGHT_FAIL   false

Definition at line 188 of file P_ClusterInternal.h.

#define TEST_READ_LOCKS_MISSED   0

Definition at line 147 of file P_ClusterInternal.h.

#define TEST_TIMING   0

Definition at line 146 of file P_ClusterInternal.h.

#define TEST_WRITE_LOCK_MIGHT_FAIL   false

Definition at line 193 of file P_ClusterInternal.h.

#define TEST_WRITE_LOCKS_MISSED   0

Definition at line 148 of file P_ClusterInternal.h.

#define TIMEOUT_TESTS (   _x,
  _y 
)

Definition at line 174 of file P_ClusterInternal.h.

#define TTEST (   _x  ) 

Definition at line 173 of file P_ClusterInternal.h.

#define TTTEST (   _x  ) 

Definition at line 172 of file P_ClusterInternal.h.

#define WRITE_LOCK_SPIN_COUNT   1
#define WRITE_MESSAGE_ALREADY_BUILT   -1

Definition at line 129 of file P_ClusterInternal.h.


Typedef Documentation

typedef int(ClusterHandler::* ClusterContHandler)(int, void *)

Definition at line 479 of file P_ClusterInternal.h.

typedef int(ClusterVConnection::* ClusterVConnHandler)(int, void *)

Definition at line 485 of file P_ClusterInternal.h.

typedef int(OutgoingControl::* OutgoingCtrlHandler)(int, void *)

Definition at line 482 of file P_ClusterInternal.h.


Function Documentation

int64_t bytes_IOBufferBlockList ( IOBufferBlock ,
int64_t   
)
void ClearHighBit ( int *  val  )  [inline]

Definition at line 442 of file P_ClusterInternal.h.

Referenced by ClusterHandler::process_incoming_callouts().

IOBufferBlock* clone_IOBufferBlockList ( IOBufferBlock ,
int  ,
int  ,
IOBufferBlock **   
)
void cluster_bump ( ClusterHandler ,
ClusterVConnectionBase ,
ClusterVConnState ,
int   
)
void cluster_disable ( ClusterHandler ,
ClusterVConnection ,
ClusterVConnState  
)
void cluster_lower_priority ( ClusterHandler ,
ClusterVConnState  
)
void cluster_raise_priority ( ClusterHandler ,
ClusterVConnState  
)
void cluster_reschedule ( ClusterHandler ,
ClusterVConnection ,
ClusterVConnState  
)
void cluster_reschedule_offset ( ClusterHandler ,
ClusterVConnection ,
ClusterVConnState ,
int   
)
void cluster_schedule ( ClusterHandler ,
ClusterVConnection ,
ClusterVConnState  
)

Definition at line 38 of file ClusterLib.cc.

void cluster_set_priority ( ClusterHandler ,
ClusterVConnState ,
int   
)
void cluster_update_priority ( ClusterHandler ,
ClusterVConnection ,
ClusterVConnState ,
int64_t  ,
int64_t   
)
void clusterAPI_init (  ) 
void clusterVCAllocator_free ( ClusterVConnection vc  ) 
IOBufferBlock* consume_IOBufferBlockList ( IOBufferBlock ,
int64_t   
)
void do_machine_config_change ( void *  ,
const char *   
)
int IsHighBitSet ( int *  val  )  [inline]

Definition at line 448 of file P_ClusterInternal.h.

Referenced by ClusterHandler::process_incoming_callouts().

int machine_config_change ( const char *  ,
RecDataT  ,
RecData  ,
void *   
)
void machine_offline_APIcallout ( int   ) 

Definition at line 419 of file ClusterAPI.cc.

References ink_atomiclist_push(), IP_TO_NODE_HANDLE, and NODE_OFFLINE.

Referenced by ClusterHandler::machine_down().

void machine_online_APIcallout ( int   ) 

Definition at line 408 of file ClusterAPI.cc.

References ink_atomiclist_push(), IP_TO_NODE_HANDLE, and NODE_ONLINE.

Referenced by ClusterHandler::startClusterEvent().

void SetHighBit ( int *  val  )  [inline]

Definition at line 436 of file P_ClusterInternal.h.

Referenced by ClusterHandler::process_small_control_msgs().


Variable Documentation