Package clojure.lang

Examples of clojure.lang.IFn.applyTo()


      List<Object> args = new ArrayList<Object>() {{
          add(conf);
          add(context);
        }};

      _aggregator = (Aggregator) preparer.applyTo(RT.seq(args));

      try {
        _aggregator.prepare(conf, context);
      } catch (AbstractMethodError ame) {
View Full Code Here


  private void bootClojure() {
    if(!_booted) {
      try {
        IFn hof = Utils.loadClojureFn(_fnSpec.get(0), _fnSpec.get(1));
        _aggregator = (CombinerAggregator) hof.applyTo(RT.seq(_params));
        _booted = true;
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
View Full Code Here

      List<Object> args = new ArrayList<Object>() {{
          add(conf);
          add(context);
        }};

      _fn = (Function) preparer.applyTo(RT.seq(args));

      try {
        _fn.prepare(conf, context);
      } catch (AbstractMethodError ame) {
View Full Code Here

    _params = params;
    _fnSpec = fnSpec;

    try {
      IFn hof = Utils.loadClojureFn(_fnSpec.get(0), _fnSpec.get(1));
      _backingMap = (IBackingMap) hof.applyTo(RT.seq(_params));
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

      List<Object> args = new ArrayList<Object>() {{
          add(conf);
          add(context);
        }};

      _queryFn = (QueryFunction) preparer.applyTo(RT.seq(args));

      try {
        _queryFn.prepare(conf, context);
      } catch (AbstractMethodError ame) {
View Full Code Here

      List<Object> args = new ArrayList<Object>() {{
          add(conf);
          add(context);
        }};

      _filter = (Filter) preparer.applyTo(RT.seq(args));

      try {
        _filter.prepare(conf, context);
      } catch (AbstractMethodError ame) {
View Full Code Here

      List<Object> args = new ArrayList<Object>() {{
          add(conf);
          add(context);
        }};

      _stateUpdater = (StateUpdater) preparer.applyTo(RT.seq(args));

      try {
        _stateUpdater.prepare(conf, context);
      } catch (AbstractMethodError ame) {
View Full Code Here

                add(stormConf);
                add(context);
                add(collectorMap);
            }};
           
            _bolt = (IBolt) preparer.applyTo(RT.seq(args));
            //this is kind of unnecessary for clojure
            try {
                _bolt.prepare(stormConf, context, collector);
            } catch(AbstractMethodError ame) {
               
View Full Code Here

    @Override
    public Map<String, Object> getComponentConfiguration() {
        IFn hof = Utils.loadClojureFn(_confSpec.get(0), _confSpec.get(1));
        try {
            return (Map) hof.applyTo(RT.seq(_params));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
View Full Code Here

                add(conf);
                add(context);
                add(collectorMap);
            }};
           
            _spout = (ISpout) preparer.applyTo(RT.seq(args));
            //this is kind of unnecessary for clojure
            try {
                _spout.open(conf, context, collector);
            } catch(AbstractMethodError ame) {
               
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.