acs::Cluster method allowed_command (protected)
<instance of acs::Cluster> allowed_command cmd
Defined in packages/acs-tcl/tcl/cluster-procs.tcl
Check, which command are allowed to be executed in the cluster. ns_log notice "--cluster allowed [dict keys ${:allowed_command}]?"
- Parameters:
- cmd (required)
- Testcases:
- No testcase defined.
Source code: set cmd_name [lindex $cmd 0] #ns_log notice "--cluster can i execute $cmd_name? [dict exists ${:allowed_command} $cmd_name]" if {[dict exists ${:allowed_command} $cmd_name]} { set except_RE [dict get ${:allowed_command} $cmd_name] #ns_log notice "--cluster [list regexp $except_RE $cmd] -> [regexp $except_RE $cmd]" set allowed [expr {$except_RE eq "" || ![regexp $except_RE $cmd]}] } elseif {[nsf::is object $cmd_name] && ([$cmd_name ::nsf::methods::object::info::hastype acs::Cache] || [$cmd_name ::nsf::methods::object::info::hastype acs::LockfreeCache])} { # # Allow operations on cache objects (e.g. needed for) # ns_log notice "--cluster acs_cache operation: $cmd" set allowed 1 } else { set allowed 0 } return $allowedXQL Not present: Generic, PostgreSQL, Oracle