Package com.facebook.concurrency

Examples of com.facebook.concurrency.ErrorLoggingRunnable


  // Internal helper classes

  private class ConnectionWatcher implements Watcher {
    @Override
    public void process(final WatchedEvent event) {
      watchExecutor.execute(new ErrorLoggingRunnable(new Runnable() {
        @Override
        public void run() {
          try {
            initLatch.await(); // Wait until we have been fully initialized
          } catch (InterruptedException e) {
View Full Code Here


      );
    private final AtomicBoolean isScheduled = new AtomicBoolean(false);

    public void activate() {
      if (isScheduled.compareAndSet(false, true)) {
        retryExecutor.execute(new ErrorLoggingRunnable(new Runnable() {
          @Override
          public void run() {
            try {
              connect();
              return; // Success, don't reschedule
View Full Code Here

      }

      private void startInitLoop() {
        isActive = true;
        if (scheduleCompareAndSet()) {
          retryExecutor.execute(new ErrorLoggingRunnable(new Runnable() {
            @Override
            public void run() {
              try {
                synchronized (transitionLock) {
                  // Only initialize if we are in the same state
View Full Code Here

      }

      private void startRepairLoop() {
        isActive = true;
        if (scheduleCompareAndSet()) {
          retryExecutor.execute(new ErrorLoggingRunnable(new Runnable() {
            @Override
            public void run() {
              try {
                synchronized (transitionLock) {
                  // Only repair if we are still in the same state
View Full Code Here

        ignoreOneDelete = false;
      }

      @Override
      public void process(final WatchedEvent event) {
        watchExecutor.execute(new ErrorLoggingRunnable(new Runnable() {
          @Override
          public void run() {
            switch (event.getState()) {
              case SyncConnected:
                processNodeEvent(event.getType());
View Full Code Here

    }

    private class PredecessorWatcher implements Watcher {
      @Override
      public void process(final WatchedEvent event) {
        watchExecutor.execute(new ErrorLoggingRunnable(new Runnable() {
          @Override
          public void run() {
            if (event.getType() != Event.EventType.None) {
              // Check for changes in predecessor and re-set watch if necessary.
              try {
View Full Code Here

        ignoreOneDelete = false;
      }

      @Override
      public void process(final WatchedEvent event) {
        watchExecutor.execute(new ErrorLoggingRunnable(new Runnable() {
          @Override
          public void run() {
            switch (event.getState()) {
              case SyncConnected:
                processNodeEvent(event.getType());
View Full Code Here

    }

    private class PredecessorWatcher implements Watcher {
      @Override
      public void process(final WatchedEvent event) {
        watchExecutor.execute(new ErrorLoggingRunnable(new Runnable() {
          @Override
          public void run() {
            if (event.getType() != Event.EventType.None) {
              // Check for changes in predecessor and re-set watch if necessary.
              try {
View Full Code Here

      );
    private final AtomicBoolean isScheduled = new AtomicBoolean(false);

    public void activate() {
      if (isScheduled.compareAndSet(false, true)) {
        retryExecutor.execute(new ErrorLoggingRunnable(new Runnable() {
          @Override
          public void run() {
            try {
              connect();
              return; // Success, don't reschedule
View Full Code Here

  // Internal helper classes

  private class ConnectionWatcher implements Watcher {
    @Override
    public void process(final WatchedEvent event) {
      watchExecutor.execute(new ErrorLoggingRunnable(new Runnable() {
        @Override
        public void run() {
          try {
            initLatch.await(); // Wait until we have been fully initialized
          } catch (InterruptedException e) {
View Full Code Here

TOP

Related Classes of com.facebook.concurrency.ErrorLoggingRunnable

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.