Skip to content

Instantly share code, notes, and snippets.

View nsivabalan's full-sized avatar

Sivabalan Narayanan nsivabalan

View GitHub Profile
package com.ubercab.network.ramengrpc;
import java.util.concurrent.atomic.AtomicBoolean;
public class CustomStopWatch implements Runnable {
private final long timeoutMs;
private final TimeoutCallBack callBack;
private AtomicBoolean eventTriggered = new AtomicBoolean(false);
private AtomicBoolean shutdownInvoked = new AtomicBoolean(false);
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
public class AccessTokenLogoutInfo {
private String accessToken;
private boolean isLoggedout;
public AccessTokenLogoutInfo(String accessToken, boolean isLoggedout) {
this.accessToken = accessToken;
this.isLoggedout = isLoggedout;
}
public String getAccessToken() {
public class CustomStopWatch implements Runnable {
private final long timeoutMs;
private final TimeoutCallBack callBack;
private AtomicBoolean eventTriggered = new AtomicBoolean(false);
public CustomStopWatch(TimeoutCallBack callBack, long timeoutMs) {
this.callBack = callBack;
this.timeoutMs = timeoutMs;
}
first_insert:
config:
record_size: 10000
num_insert_partitions: 1
repeat_count: 1
num_records_insert: 1000
type: InsertNode
deps: none
first_hive_sync:
config:
package com.ubercab.core.oauth_token_manager;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.ubercab.experiment.DynamicExperiments;
import com.ubercab.experiment.model.ExperimentUpdate;
import com.ubercab.lumber.core.Lumber;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicBoolean;
import rx.Subscription;