com.google.ipc.invalidation.ticl.Statistics.ListenerEventType Java Examples

The following examples show how to use com.google.ipc.invalidation.ticl.Statistics.ListenerEventType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void informRegistrationFailure(final InvalidationClient client, final ObjectId objectId,
    final boolean isTransient, final String errorMessage) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.regFailure") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INFORM_REGISTRATION_FAILURE);
      delegate.informRegistrationFailure(client, objectId, isTransient, errorMessage);
    }
  });
}
 
Example #2
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void informError(final InvalidationClient client, final ErrorInfo errorInfo) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.informError") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INFORM_ERROR);
      delegate.informError(client, errorInfo);
    }
  });
}
 
Example #3
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void reissueRegistrations(final InvalidationClient client, final byte[] prefix,
    final int prefixLen) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.reissueRegs") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.REISSUE_REGISTRATIONS);
      delegate.reissueRegistrations(client, prefix, prefixLen);
    }
  });
}
 
Example #4
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void informRegistrationStatus(final InvalidationClient client, final ObjectId objectId,
    final RegistrationState regState) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.regStatus") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INFORM_REGISTRATION_STATUS);
      delegate.informRegistrationStatus(client, objectId, regState);
    }
  });
}
 
Example #5
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void informRegistrationFailure(final InvalidationClient client, final ObjectId objectId,
    final boolean isTransient, final String errorMessage) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.regFailure") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INFORM_REGISTRATION_FAILURE);
      delegate.informRegistrationFailure(client, objectId, isTransient, errorMessage);
    }
  });
}
 
Example #6
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void invalidateAll(final InvalidationClient client, final AckHandle ackHandle) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  Preconditions.checkNotNull(ackHandle);
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.invalidateAll") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INVALIDATE_ALL);
      delegate.invalidateAll(client, ackHandle);
    }
  });
}
 
Example #7
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void invalidateUnknownVersion(final InvalidationClient client, final ObjectId objectId,
    final AckHandle ackHandle) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  Preconditions.checkNotNull(ackHandle);
  listenerScheduler.schedule(NO_DELAY,
      new NamedRunnable("CheckingInvalListener.invalidateUnknownVersion") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INVALIDATE_UNKNOWN);
      delegate.invalidateUnknownVersion(client, objectId, ackHandle);
    }
  });
}
 
Example #8
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void invalidate(final InvalidationClient client, final Invalidation invalidation,
    final AckHandle ackHandle) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  Preconditions.checkNotNull(ackHandle);
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.invalidate") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INVALIDATE);
      delegate.invalidate(client, invalidation, ackHandle);
    }
  });
}
 
Example #9
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void informError(final InvalidationClient client, final ErrorInfo errorInfo) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.informError") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INFORM_ERROR);
      delegate.informError(client, errorInfo);
    }
  });
}
 
Example #10
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void reissueRegistrations(final InvalidationClient client, final byte[] prefix,
    final int prefixLen) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.reissueRegs") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.REISSUE_REGISTRATIONS);
      delegate.reissueRegistrations(client, prefix, prefixLen);
    }
  });
}
 
Example #11
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void informRegistrationStatus(final InvalidationClient client, final ObjectId objectId,
    final RegistrationState regState) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.regStatus") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INFORM_REGISTRATION_STATUS);
      delegate.informRegistrationStatus(client, objectId, regState);
    }
  });
}
 
Example #12
Source File: CheckingInvalidationListener.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public void invalidate(final InvalidationClient client, final Invalidation invalidation,
    final AckHandle ackHandle) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  Preconditions.checkNotNull(ackHandle);
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.invalidate") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INVALIDATE);
      delegate.invalidate(client, invalidation, ackHandle);
    }
  });
}
 
Example #13
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void invalidateAll(final InvalidationClient client, final AckHandle ackHandle) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  Preconditions.checkNotNull(ackHandle);
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.invalidateAll") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INVALIDATE_ALL);
      delegate.invalidateAll(client, ackHandle);
    }
  });
}
 
Example #14
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void invalidateUnknownVersion(final InvalidationClient client, final ObjectId objectId,
    final AckHandle ackHandle) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  Preconditions.checkNotNull(ackHandle);
  listenerScheduler.schedule(NO_DELAY,
      new NamedRunnable("CheckingInvalListener.invalidateUnknownVersion") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INVALIDATE_UNKNOWN);
      delegate.invalidateUnknownVersion(client, objectId, ackHandle);
    }
  });
}
 
Example #15
Source File: CheckingInvalidationListener.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void invalidate(final InvalidationClient client, final Invalidation invalidation,
    final AckHandle ackHandle) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  Preconditions.checkNotNull(ackHandle);
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.invalidate") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INVALIDATE);
      delegate.invalidate(client, invalidation, ackHandle);
    }
  });
}
 
Example #16
Source File: CheckingInvalidationListener.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public void informError(final InvalidationClient client, final ErrorInfo errorInfo) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.informError") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INFORM_ERROR);
      delegate.informError(client, errorInfo);
    }
  });
}
 
Example #17
Source File: CheckingInvalidationListener.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public void reissueRegistrations(final InvalidationClient client, final byte[] prefix,
    final int prefixLen) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.reissueRegs") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.REISSUE_REGISTRATIONS);
      delegate.reissueRegistrations(client, prefix, prefixLen);
    }
  });
}
 
Example #18
Source File: CheckingInvalidationListener.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public void informRegistrationStatus(final InvalidationClient client, final ObjectId objectId,
    final RegistrationState regState) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.regStatus") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INFORM_REGISTRATION_STATUS);
      delegate.informRegistrationStatus(client, objectId, regState);
    }
  });
}
 
Example #19
Source File: CheckingInvalidationListener.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public void informRegistrationFailure(final InvalidationClient client, final ObjectId objectId,
    final boolean isTransient, final String errorMessage) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.regFailure") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INFORM_REGISTRATION_FAILURE);
      delegate.informRegistrationFailure(client, objectId, isTransient, errorMessage);
    }
  });
}
 
Example #20
Source File: CheckingInvalidationListener.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public void invalidateAll(final InvalidationClient client, final AckHandle ackHandle) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  Preconditions.checkNotNull(ackHandle);
  listenerScheduler.schedule(NO_DELAY, new NamedRunnable("CheckingInvalListener.invalidateAll") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INVALIDATE_ALL);
      delegate.invalidateAll(client, ackHandle);
    }
  });
}
 
Example #21
Source File: CheckingInvalidationListener.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public void invalidateUnknownVersion(final InvalidationClient client, final ObjectId objectId,
    final AckHandle ackHandle) {
  Preconditions.checkState(internalScheduler.isRunningOnThread(), "Not on internal thread");
  Preconditions.checkNotNull(ackHandle);
  listenerScheduler.schedule(NO_DELAY,
      new NamedRunnable("CheckingInvalListener.invalidateUnknownVersion") {
    @Override
    public void run() {
      statistics.recordListenerEvent(ListenerEventType.INVALIDATE_UNKNOWN);
      delegate.invalidateUnknownVersion(client, objectId, ackHandle);
    }
  });
}