Package com.linkedin.databus2.core

Examples of com.linkedin.databus2.core.BackoffTimer


  }

  public static ErrorResponse createInvalidEvent(String errMsg)
  {
    return new ErrorResponse(BinaryProtocol.RESULT_ERR_INVALID_EVENT,
                             new DatabusException(errMsg));
  }
View Full Code Here


  }

  public static ErrorResponse createUnsupportedDbusEventVersion(String errMsg)
  {
    return new ErrorResponse(BinaryProtocol.RESULT_ERR_UNSUPPORTED_DBUS_EVENT_VERSION,
                             new DatabusException(errMsg));
  }
View Full Code Here

      processorRegistry.register(ContainerOperationProcessor.COMMAND_NAME,
                                 new ContainerOperationProcessor(null, this));
    }
    catch (SQLException sqle)
    {
      throw new DatabusException("command registration failed", sqle);
    }
    catch (InstantiationException e)
    {
      throw new DatabusException("command registration failed", e);
    }
    catch (IllegalAccessException e)
    {
      throw new DatabusException("command registration failed", e);
    }
    catch (ClassNotFoundException e)
    {
      throw new DatabusException("command registration failed", e);
    }

    LOG.info("Done Initializing Bootstrap HTTP Server");

  }
View Full Code Here

     */

    // Create the event producer
    String uri = pConfig.getUri();
    if(uri == null)
      throw new DatabusException("Uri is required to start the relay");
    uri = uri.trim();
    EventProducer producer = null;
    if (uri.startsWith("jdbc:")) {
      SourceType sourceType = pConfig.getReplBitSetter().getSourceType();
          if (SourceType.TOKEN.equals(sourceType))
            throw new DatabusException("Token Source-type for Replication bit setter config cannot be set for trigger-based Databus relay !!");

      // if a buffer for this partiton exists - we are overwri
      producer = new OracleEventProducerFactory().buildEventProducer(
          pConfig, schemaRegistryService, dbusEventBuffer,
          getMbeanServer(), _inBoundStatsCollectors
View Full Code Here

    }*/
  }

  private void processContainerStats(DatabusRequest request) throws IOException
  {
    ContainerStats containerStats = _containerStatsCollector.getContainerStats();
    if (null == containerStats)
    {
      return;
    }
    writeJsonObjectToResponse(containerStats, request);
View Full Code Here

  {
    String category = request.getParams().getProperty(DatabusRequest.PATH_PARAM_NAME);
    String prefix = "outbound/client/";
    String client = category.substring(prefix.length());

    ContainerTrafficTotalStats clientStats = _containerStatsCollector.getOutboundClientStats(client);
    if (null == clientStats)
    {
      throw new InvalidRequestParamValueException(request.getName(), prefix, client);
    }

    JsonEncoder jsonEncoder = clientStats.createJsonEncoder(
        Channels.newOutputStream(request.getResponseContent()));
    clientStats.toJson(jsonEncoder, null);

    if (request.getRequestType() == HttpMethod.PUT || request.getRequestType() == HttpMethod.POST)
    {
      enableOrResetStatsMBean(clientStats, request);
    }
View Full Code Here

  }

  private void processOutboundTrafficTotalStats(DatabusRequest request) throws IOException
  {

    ContainerTrafficTotalStatsMBean outboundTrafficTotalStatsMBean =
      _containerStatsCollector.getOutboundTrafficTotalStats();
    if (null == outboundTrafficTotalStatsMBean) return;

    //String json = outboundTrafficTotalStatsMBean.toJson();
    JsonEncoder jsonEncoder =
        outboundTrafficTotalStatsMBean.createJsonEncoder(
            Channels.newOutputStream(request.getResponseContent()));
    outboundTrafficTotalStatsMBean.toJson(jsonEncoder, null);

    if (request.getRequestType() == HttpMethod.PUT || request.getRequestType() == HttpMethod.POST)
    {
      enableOrResetStatsMBean(outboundTrafficTotalStatsMBean, request);
    }
View Full Code Here

  }

  private void processInboundTrafficTotalStats(DatabusRequest request) throws IOException
  {
    ContainerTrafficTotalStatsMBean inboundTrafficTotalStatsMBean =
      _containerStatsCollector.getInboundTrafficTotalStats();
    if (null == inboundTrafficTotalStatsMBean) return;

    //String json = inboundTrafficTotalStatsMBean.toJson();
    JsonEncoder jsonEncoder =
        inboundTrafficTotalStatsMBean.createJsonEncoder(
            Channels.newOutputStream(request.getResponseContent()));
    inboundTrafficTotalStatsMBean.toJson(jsonEncoder, null);

    if (request.getRequestType() == HttpMethod.PUT || request.getRequestType() == HttpMethod.POST)
    {
      enableOrResetStatsMBean(inboundTrafficTotalStatsMBean, request);
    }
View Full Code Here

    }

    @Override
    protected DatabusComponentAdmin createComponentAdmin()
    { 
      return new DatabusComponentAdmin(this, null, "fake")
    }
View Full Code Here

  }

  @Override
  protected DatabusComponentAdmin createComponentAdmin()
  {
    return new DatabusComponentAdmin(this,
                                     getMbeanServer(),
                                     BootstrapHttpServer.class.getSimpleName());
  }
View Full Code Here

TOP

Related Classes of com.linkedin.databus2.core.BackoffTimer

Copyright © 2018 www.massapicom. 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.