Tabnine Logo
InvocationType
Code IndexAdd Tabnine to your IDE (free)

How to use
InvocationType
in
org.apache.servicecomb.swagger.invocation

Best Java code snippets using org.apache.servicecomb.swagger.invocation.InvocationType (Showing top 20 results out of 315)

origin: apache/servicecomb-java-chassis

public String getInvocationQualifiedName() {
 return invocationType.name();
}
origin: apache/servicecomb-java-chassis

public boolean isConsumer() {
 return InvocationType.CONSUMER.equals(invocationType);
}
origin: apache/servicecomb-java-chassis

public String getInvocationQualifiedName() {
 return invocationType.name() + " " + getRealTransportName() + " "
   + getOperationMeta().getMicroserviceQualifiedName();
}
origin: apache/servicecomb-java-chassis

public static Response createFail(InvocationType invocationType, Throwable throwable) {
 if (InvocationType.CONSUMER.equals(invocationType)) {
  return createConsumerFail(throwable);
 }
 return createProducerFail(throwable);
}
origin: apache/servicecomb-java-chassis

 invocationName = MeterInvocationConst.EDGE_INVOCATION_NAME;
} else {
 invocationName = invocation.getInvocationType().name();
origin: apache/servicecomb-java-chassis

public Converter findConverter(InvocationType invocationType, Type provider, Type swagger) {
 if (InvocationType.CONSUMER.equals(invocationType)) {
  return findConverter(provider, swagger);
 }
 return findConverter(swagger, provider);
}
origin: apache/servicecomb-java-chassis

 public DefaultPublishModel createDefaultPublishModel() {
  DefaultPublishModel model = new DefaultPublishModel();

  model.getConsumer()
    .setOperationPerfGroups(generateOperationPerfGroups(tree, InvocationType.CONSUMER.name()));

  model.getProducer()
    .setOperationPerfGroups(generateOperationPerfGroups(tree, InvocationType.PRODUCER.name()));
  //edge
  model.getEdge()
    .setOperationPerfGroups(generateOperationPerfGroups(tree, MeterInvocationConst.EDGE_INVOCATION_NAME));

  ThreadPoolMonitorPublishModelFactory.create(tree, model.getThreadPools());

  return model;
 }
}
origin: apache/servicecomb-java-chassis

public List<Handler> getHandlerChain() {
 return (InvocationType.CONSUMER.equals(invocationType)) ? schemaMeta.getConsumerHandlerChain()
   : schemaMeta.getProviderHandlerChain();
}
origin: org.apache.servicecomb/swagger-invocation-core

public String getInvocationQualifiedName() {
 return invocationType.name();
}
origin: apache/servicecomb-java-chassis

public static Response createFail(InvocationType invocationType, String errorMsg) {
 CommonExceptionData errorData = new CommonExceptionData(errorMsg);
 if (InvocationType.CONSUMER.equals(invocationType)) {
  return createFail(ExceptionFactory.createConsumerException(errorData));
 }
 return createFail(ExceptionFactory.createProducerException(errorData));
}
origin: apache/servicecomb-java-chassis

public CircutBreakerEvent(HystrixCommandKey commandKey, Type type) {
 super(type);
 HystrixCommandMetrics hystrixCommandMetrics = HystrixCommandMetrics.getInstance(commandKey);
 if (hystrixCommandMetrics != null) {
  if (hystrixCommandMetrics.getCommandGroup() instanceof CustomizeCommandGroupKey) {
   CustomizeCommandGroupKey customCommandGroupKey =
     (CustomizeCommandGroupKey) hystrixCommandMetrics.getCommandGroup();
   this.microservice = customCommandGroupKey.getInstance().getMicroserviceName();
   this.role = customCommandGroupKey.getInstance().getInvocationType().name();
   this.schema = customCommandGroupKey.getInstance().getSchemaId();
   this.operation = customCommandGroupKey.getInstance().getOperationName();
  }
  this.currentTotalRequest = hystrixCommandMetrics.getHealthCounts().getTotalRequests();
  this.currentErrorPercentage = hystrixCommandMetrics.getHealthCounts().getErrorCount();
  this.currentErrorCount = hystrixCommandMetrics.getHealthCounts().getErrorPercentage();
  this.requestVolumeThreshold = hystrixCommandMetrics.getProperties().circuitBreakerRequestVolumeThreshold().get();
  this.sleepWindowInMilliseconds =
    hystrixCommandMetrics.getProperties().circuitBreakerSleepWindowInMilliseconds().get();
  this.errorThresholdPercentage =
    hystrixCommandMetrics.getProperties().circuitBreakerErrorThresholdPercentage().get();
 }
}
origin: org.apache.servicecomb/java-chassis-core

public boolean isConsumer() {
 return InvocationType.CONSUMER.equals(invocationType);
}
origin: org.apache.servicecomb/java-chassis-core

public String getInvocationQualifiedName() {
 return invocationType.name() + " " + getRealTransportName() + " "
   + getOperationMeta().getMicroserviceQualifiedName();
}
origin: org.apache.servicecomb/swagger-invocation-core

public Converter findConverter(InvocationType invocationType, Type provider, Type swagger) {
 if (InvocationType.CONSUMER.equals(invocationType)) {
  return findConverter(provider, swagger);
 }
 return findConverter(swagger, provider);
}
origin: org.apache.servicecomb/metrics-core

 invocationName = MeterInvocationConst.EDGE_INVOCATION_NAME;
} else {
 invocationName = invocation.getInvocationType().name();
origin: org.apache.servicecomb/swagger-invocation-core

public static Response createFail(InvocationType invocationType, Throwable throwable) {
 if (InvocationType.CONSUMER.equals(invocationType)) {
  return createConsumerFail(throwable);
 }
 return createProducerFail(throwable);
}
origin: org.apache.servicecomb/metrics-core

 public DefaultPublishModel createDefaultPublishModel() {
  DefaultPublishModel model = new DefaultPublishModel();

  model.getConsumer()
    .setOperationPerfGroups(generateOperationPerfGroups(tree, InvocationType.CONSUMER.name()));

  model.getProducer()
    .setOperationPerfGroups(generateOperationPerfGroups(tree, InvocationType.PRODUCER.name()));
  //edge
  model.getEdge()
    .setOperationPerfGroups(generateOperationPerfGroups(tree, MeterInvocationConst.EDGE_INVOCATION_NAME));

  ThreadPoolMonitorPublishModelFactory.create(tree, model.getThreadPools());

  return model;
 }
}
origin: org.apache.servicecomb/java-chassis-core

public List<Handler> getHandlerChain() {
 return (InvocationType.CONSUMER.equals(invocationType)) ? schemaMeta.getConsumerHandlerChain()
   : schemaMeta.getProviderHandlerChain();
}
origin: org.apache.servicecomb/handler-bizkeeper

public CircutBreakerEvent(HystrixCommandKey commandKey, Type type) {
 super(type);
 HystrixCommandMetrics hystrixCommandMetrics = HystrixCommandMetrics.getInstance(commandKey);
 if (hystrixCommandMetrics != null) {
  if (hystrixCommandMetrics.getCommandGroup() instanceof CustomizeCommandGroupKey) {
   CustomizeCommandGroupKey customCommandGroupKey =
     (CustomizeCommandGroupKey) hystrixCommandMetrics.getCommandGroup();
   this.microservice = customCommandGroupKey.getInstance().getMicroserviceName();
   this.role = customCommandGroupKey.getInstance().getInvocationType().name();
   this.schema = customCommandGroupKey.getInstance().getSchemaId();
   this.operation = customCommandGroupKey.getInstance().getOperationName();
  }
  this.currentTotalRequest = hystrixCommandMetrics.getHealthCounts().getTotalRequests();
  this.currentErrorPercentage = hystrixCommandMetrics.getHealthCounts().getErrorCount();
  this.currentErrorCount = hystrixCommandMetrics.getHealthCounts().getErrorPercentage();
  this.requestVolumeThreshold = hystrixCommandMetrics.getProperties().circuitBreakerRequestVolumeThreshold().get();
  this.sleepWindowInMilliseconds =
    hystrixCommandMetrics.getProperties().circuitBreakerSleepWindowInMilliseconds().get();
  this.errorThresholdPercentage =
    hystrixCommandMetrics.getProperties().circuitBreakerErrorThresholdPercentage().get();
 }
}
origin: org.apache.servicecomb/swagger-invocation-core

public static Response createFail(InvocationType invocationType, String errorMsg) {
 CommonExceptionData errorData = new CommonExceptionData(errorMsg);
 if (InvocationType.CONSUMER.equals(invocationType)) {
  return createFail(ExceptionFactory.createConsumerException(errorData));
 }
 return createFail(ExceptionFactory.createProducerException(errorData));
}
org.apache.servicecomb.swagger.invocationInvocationType

Most used methods

  • name
  • equals

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Collectors (java.util.stream)
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now