def set_batch_commitlog()

in ccmlib/node.py [0:0]


    def set_batch_commitlog(self, enabled=False, use_batch_window=True):
        """
        The batch_commitlog option gives an easier way to switch to batch
        commitlog (since it requires setting 2 options and unsetting one).
        """
        if enabled:
            if use_batch_window:
                values = {
                    "commitlog_sync": "batch",
                    "commitlog_sync_batch_window_in_ms": 5,
                    "commitlog_sync_period_in_ms": None
                }
            else:
               values = {
                    "commitlog_sync": "batch",
                    "commitlog_sync_period_in_ms": None
               }
        else:
            if use_batch_window:
                values = {
                    "commitlog_sync": "periodic",
                    "commitlog_sync_batch_window_in_ms": None,
                    "commitlog_sync_period_in_ms": 10000
                }
            else:
                values = {
                    "commitlog_sync": "periodic",
                    "commitlog_sync_period_in_ms": 10000
                }

        self.set_configuration_options(values)