/** Deprecated; will be removed in the next release */ @Deprecated protected AbstractCommand(Config config, Command parent, Command child, MorphlineContext context) { Preconditions.checkNotNull(config); Preconditions.checkNotNull(parent); Preconditions.checkNotNull(child); Preconditions.checkNotNull(context); this.config = config; this.parent = parent; this.child = child; this.context = context; this.name = "morphline." + getShortClassName(getClass()); this.configs = new Configs(); this.numProcessCallsMeter = getMeter(Metrics.NUM_PROCESS_CALLS); this.numNotifyCallsMeter = getMeter(Metrics.NUM_NOTIFY_CALLS); }
/** Deprecated; will be removed in the next release */ @Deprecated protected AbstractCommand(Config config, Command parent, Command child, MorphlineContext context) { Preconditions.checkNotNull(config); Preconditions.checkNotNull(parent); Preconditions.checkNotNull(child); Preconditions.checkNotNull(context); this.config = config; this.parent = parent; this.child = child; this.context = context; this.name = "morphline." + getShortClassName(getClass()); this.configs = new Configs(); this.numProcessCallsMeter = getMeter(Metrics.NUM_PROCESS_CALLS); this.numNotifyCallsMeter = getMeter(Metrics.NUM_NOTIFY_CALLS); }
/** * Using the given <code>builder</code>, constructs a command rooted at the given morphline JSON * <code>config</code>. * * The command will feed records into <code>child</code>. The command will have * <code>parent</code> as it's parent. Additional parameters can be passed via the morphline * <code>context</code>. */ protected AbstractCommand(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { Preconditions.checkNotNull(builder); Preconditions.checkNotNull(config); Preconditions.checkNotNull(parent); Preconditions.checkNotNull(child); Preconditions.checkNotNull(context); this.config = config; this.parent = parent; this.child = child; this.context = context; Preconditions.checkArgument(builder.getNames().size() > 0); this.name = "morphline." + builder.getNames().iterator().next(); this.configs = new Configs(); this.numProcessCallsMeter = getMeter(Metrics.NUM_PROCESS_CALLS); this.numNotifyCallsMeter = getMeter(Metrics.NUM_NOTIFY_CALLS); }
/** * Using the given <code>builder</code>, constructs a command rooted at the given morphline JSON * <code>config</code>. * * The command will feed records into <code>child</code>. The command will have * <code>parent</code> as it's parent. Additional parameters can be passed via the morphline * <code>context</code>. */ protected AbstractCommand(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { Preconditions.checkNotNull(builder); Preconditions.checkNotNull(config); Preconditions.checkNotNull(parent); Preconditions.checkNotNull(child); Preconditions.checkNotNull(context); this.config = config; this.parent = parent; this.child = child; this.context = context; Preconditions.checkArgument(builder.getNames().size() > 0); this.name = "morphline." + builder.getNames().iterator().next(); this.configs = new Configs(); this.numProcessCallsMeter = getMeter(Metrics.NUM_PROCESS_CALLS); this.numNotifyCallsMeter = getMeter(Metrics.NUM_NOTIFY_CALLS); }