summaryrefslogtreecommitdiff
path: root/TAO/tao/default_resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/default_resource.cpp')
-rw-r--r--TAO/tao/default_resource.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp
index cded694781c..12f9620d80a 100644
--- a/TAO/tao/default_resource.cpp
+++ b/TAO/tao/default_resource.cpp
@@ -11,6 +11,9 @@
#include "tao/Single_Reactor.h"
#include "tao/Priority_Mapping.h"
+#include "tao/Reactive_Flushing_Strategy.h"
+#include "tao/Block_Flushing_Strategy.h"
+
#include "ace/TP_Reactor.h"
#include "ace/Dynamic_Service.h"
#include "ace/Arg_Shifter.h"
@@ -33,6 +36,7 @@ TAO_Default_Resource_Factory::TAO_Default_Resource_Factory (void)
reactor_mask_signals_ (1),
dynamically_allocated_reactor_ (0),
cached_connection_lock_type_ (TAO_THREAD_LOCK)
+ , flushing_strategy_type_ (TAO_REACTIVE_FLUSHING)
{
}
@@ -194,6 +198,7 @@ TAO_Default_Resource_Factory::init (int argc, char **argv)
this->add_to_ior_parser_names (argv[curarg]);
}
}
+
else if (ACE_OS::strcasecmp (argv[curarg],
"-ORBConnectionCacheLock") == 0)
{
@@ -210,6 +215,7 @@ TAO_Default_Resource_Factory::init (int argc, char **argv)
this->cached_connection_lock_type_ = TAO_NULL_LOCK;
}
}
+
else if (ACE_OS::strcasecmp (argv[curarg],
"-ORBConnectionLock") == 0)
{
@@ -230,6 +236,7 @@ TAO_Default_Resource_Factory::init (int argc, char **argv)
this->cached_connection_lock_type_ = TAO_NULL_LOCK;
}
}
+
else if (ACE_OS::strcasecmp (argv[curarg],
"-ORBConnectorLock") == 0)
{
@@ -251,6 +258,23 @@ TAO_Default_Resource_Factory::init (int argc, char **argv)
}
}
+ else if (ACE_OS::strcasecmp (argv[curarg],
+ "-ORBFlushingStrategy") == 0)
+ {
+ curarg++;
+ if (curarg < argc)
+ {
+ char *name = argv[curarg];
+
+ if (ACE_OS::strcasecmp (name,
+ "reactive") == 0)
+ this->flushing_strategy_type_ = TAO_REACTIVE_FLUSHING;
+ else if (ACE_OS::strcasecmp (name,
+ "blocking") == 0)
+ this->flushing_strategy_type_ = TAO_BLOCKING_FLUSHING;
+ }
+ }
+
return 0;
}
@@ -699,6 +723,21 @@ TAO_Default_Resource_Factory::create_cached_connection_lock (void)
return the_lock;
}
+TAO_Flushing_Strategy *
+TAO_Default_Resource_Factory::create_flushing_strategy (void)
+{
+ TAO_Flushing_Strategy *strategy = 0;
+ if (this->flushing_strategy_type_ == TAO_REACTIVE_FLUSHING)
+ ACE_NEW_RETURN (strategy,
+ TAO_Reactive_Flushing_Strategy,
+ 0);
+ else
+ ACE_NEW_RETURN (strategy,
+ TAO_Block_Flushing_Strategy,
+ 0);
+ return strategy;
+}
+
TAO_Priority_Mapping *
TAO_Default_Resource_Factory::get_priority_mapping (void)
{