Tabnine Logo
LimiterServerResource.get
Code IndexAdd Tabnine to your IDE (free)

How to use
get
method
in
org.apache.gobblin.restli.throttling.LimiterServerResource

Best Java code snippets using org.apache.gobblin.restli.throttling.LimiterServerResource.get (Showing top 2 results out of 315)

origin: apache/incubator-gobblin

 /**
  * Request permits from the limiter server. The returned {@link PermitAllocation} specifies the number of permits
  * that the client can use.
  */
 public PermitAllocation getSync(ComplexResourceKey<PermitRequest, EmptyRecord> key) {
  try {
   FutureCallback<PermitAllocation> callback = new FutureCallback<>();

   get(key, callback);
   return callback.get();
  } catch (ExecutionException ee) {
   Throwable t = ee.getCause();
   if (t instanceof RestLiServiceException) {
    throw (RestLiServiceException) t;
   } else {
    throw new RuntimeException(t);
   }
  } catch (InterruptedException ie) {
   throw new RuntimeException(ie);
  }
 }
}
origin: org.apache.gobblin/gobblin-throttling-service-server

 /**
  * Request permits from the limiter server. The returned {@link PermitAllocation} specifies the number of permits
  * that the client can use.
  */
 public PermitAllocation getSync(ComplexResourceKey<PermitRequest, EmptyRecord> key) {
  try {
   FutureCallback<PermitAllocation> callback = new FutureCallback<>();

   get(key, callback);
   return callback.get();
  } catch (ExecutionException ee) {
   Throwable t = ee.getCause();
   if (t instanceof RestLiServiceException) {
    throw (RestLiServiceException) t;
   } else {
    throw new RuntimeException(t);
   }
  } catch (InterruptedException ie) {
   throw new RuntimeException(ie);
  }
 }
}
org.apache.gobblin.restli.throttlingLimiterServerResourceget

Javadoc

Request permits from the limiter server. The returned PermitAllocation specifies the number of permits that the client can use.

Popular methods of LimiterServerResource

  • getSync
    Request permits from the limiter server. The returned PermitAllocation specifies the number of permi

Popular in Java

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Path (java.nio.file)
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • ImageIO (javax.imageio)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Sublime Text plugins
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