index
int64
0
0
repo_id
stringlengths
26
205
file_path
stringlengths
51
246
content
stringlengths
8
433k
__index_level_0__
int64
0
10k
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/map-literal.java
Map<String, Object> map = Map.of( "Access-Control-Allow-Origin", "\"*\"");
5,900
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/string_literal.java
String literal = "\nThis is a multiline string literal.\n\n\"It's cool!\".\n\nYEAH BABY!!\n\nLitteral \\n right here (not a newline!)\n";
5,901
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/ellipsis_at_a_random_place.java
callThisFunction(foo, ...);
5,902
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/backtick_string_w_o_substitutions.java
String x = "some string";
5,903
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/as_expression.java
System.out.println((Number)3);
5,904
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/enum_like_access.java
System.out.println(EnumType.ENUM_VALUE_A);
5,905
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/await.java
Number x = future();
5,906
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/enum_access.java
System.out.println(EnumType.ENUM_VALUE_A);
5,907
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/computed_key.java
String y = "WHY?"; Map<String, String> x = Map.of(String.format("key-%s", y), "value"); Map<String, Boolean> z = Map.of(y, true);
5,908
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/double_quoted_dict_keys.java
Map<String, String> x = Map.of("key", "value");
5,909
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/unary_and_binary_operators.java
System.out.println(-3); System.out.println(!false); System.out.println(a == b);
5,910
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/string_interpolation.java
String x = "world"; String y = "well"; System.out.println(String.format("Hello, %s, it works %s!", x, y)); // And now a multi-line expression System.out.println(String.format("%nHello, %s.%n%nIt works %s!%n", x, y));
5,911
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/struct_assignment.java
public class Test { private String key; public String getKey() { return this.key; } public Test key(String key) { this.key = key; return this; } } Test x = new Test().key("value");
5,912
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/array_index.java
String[] array; System.out.println(array[3]);
5,913
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/property_access.java
object.getPropertyA(); object.getPropertyB();
5,914
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/expressions/non_null_expression.java
Object x = someObject.getSomeAttribute();
5,915
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/interfaces/interface_with_method.java
public interface IThing { void doAThing(); }
5,916
0
Create_ds/jsii-rosetta/test/translations
Create_ds/jsii-rosetta/test/translations/interfaces/interface_with_props.java
public interface IThing { String getThingArn(); }
5,917
0
Create_ds/DeepLinkDispatch/deeplinkdispatch-processor/src/test
Create_ds/DeepLinkDispatch/deeplinkdispatch-processor/src/test/resources/DeepLinkActivityUppercase.java
package com.Example; import android.app.Activity; import android.os.Bundle; import java.lang.Override; public class DeepLinkActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); DeepLinkDelegate.dispatchFrom(this); finish(); } }
5,918
0
Create_ds/DeepLinkDispatch/deeplinkdispatch-processor/src/test
Create_ds/DeepLinkDispatch/deeplinkdispatch-processor/src/test/resources/DeepLinkDelegate.java
package com.example; import com.airbnb.deeplinkdispatch.BaseDeepLinkDelegate; import java.lang.String; import java.util.Arrays; import java.util.Map; public final class DeepLinkDelegate extends BaseDeepLinkDelegate { public DeepLinkDelegate(SampleModuleRegistry sampleModuleRegistry) { super(Arrays.asList( sampleModuleRegistry )); } public DeepLinkDelegate(SampleModuleRegistry sampleModuleRegistry, Map<String, String> configurablePathSegmentReplacements) { super(Arrays.asList( sampleModuleRegistry), configurablePathSegmentReplacements ); } }
5,919
0
Create_ds/DeepLinkDispatch/deeplinkdispatch-processor/src/test
Create_ds/DeepLinkDispatch/deeplinkdispatch-processor/src/test/resources/DeepLinkActivity.java
package com.example; import android.app.Activity; import android.os.Bundle; import java.lang.Override; public class DeepLinkActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); DeepLinkDelegate.dispatchFrom(this); finish(); } }
5,920
0
Create_ds/DeepLinkDispatch/sample-library/src/main/java/com/airbnb/deeplinkdispatch/sample
Create_ds/DeepLinkDispatch/sample-library/src/main/java/com/airbnb/deeplinkdispatch/sample/library/LibraryActivity.java
package com.airbnb.deeplinkdispatch.sample.library; import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; import android.os.Bundle; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import android.util.Log; import android.widget.Toast; import com.airbnb.deeplinkdispatch.DeepLink; @DeepLink("http://example.com/library") public class LibraryActivity extends AppCompatActivity { private static final String TAG = LibraryActivity.class.getSimpleName(); @SuppressLint("RestrictedApi") @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent intent = getIntent(); if (intent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false)) { Toast.makeText(this, "Got deep link " + intent.getStringExtra(DeepLink.URI), Toast.LENGTH_SHORT).show(); } } /** * This will not create an error during index creation but could be found by writing a test * There is another example method in the main sample apps `MainActivity` */ @DeepLink("dld://host/intent/{geh}") static Intent sampleDuplicatedUrlWithDifferentPlaceholderNameInLib(Context context) { return null; } /** * This method is a more concrete match for the URI dld://host/somePathOne/somePathTwo/somePathThree * to a annotated method in `sample` that is annotated with * @DeepLink("dld://host/somePathOne/{param1}/somePathThree") and thus will never be picked over * this method when matching. * * @param context * @param bundle * @return */ @DeepLink("placeholder://host/somePathOne/somePathTwo/somePathThree") public static Intent moreConcreteMatch(Context context, Bundle bundle) { Log.d(TAG, "matched more concrete url in sample-library project."); return new Intent(context, LibraryActivity.class); } @DeepLink("placeholder://host/somePathOneAlt/{param1}/somePathThreeAlt") public static Intent moreConcreteMatchAlt(Context context, Bundle bundle) { Log.d(TAG, "matched more concrete url in sample-library project."); return new Intent(context, LibraryActivity.class); } @DeepLink("placeholder://host/somePathOneMany/somePathTwoMany/{param1}") public static Intent moreConcreteMatchMany(Context context, Bundle bundle) { Log.d(TAG, "matched more concrete url in sample-library project."); return new Intent(context, LibraryActivity.class); } }
5,921
0
Create_ds/DeepLinkDispatch/sample-library/src/main/java/com/airbnb/deeplinkdispatch/sample
Create_ds/DeepLinkDispatch/sample-library/src/main/java/com/airbnb/deeplinkdispatch/sample/library/LibraryDeepLinkModule.java
package com.airbnb.deeplinkdispatch.sample.library; import com.airbnb.deeplinkdispatch.DeepLinkModule; @DeepLinkModule public class LibraryDeepLinkModule { }
5,922
0
Create_ds/DeepLinkDispatch/sample-library/src/main/java/com/airbnb/deeplinkdispatch/sample
Create_ds/DeepLinkDispatch/sample-library/src/main/java/com/airbnb/deeplinkdispatch/sample/library/LibraryDeepLink.java
package com.airbnb.deeplinkdispatch.sample.library; import com.airbnb.deeplinkdispatch.DeepLinkSpec; @DeepLinkSpec(prefix = { "library://dld" }) public @interface LibraryDeepLink { String[] value(); }
5,923
0
Create_ds/DeepLinkDispatch/sample/src/test/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/test/java/com/airbnb/deeplinkdispatch/sample/SecondActivityTest.java
package com.airbnb.deeplinkdispatch.sample; import android.content.ComponentName; import android.content.Intent; import android.net.Uri; import com.airbnb.deeplinkdispatch.DeepLink; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; import org.robolectric.shadows.ShadowActivity; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.IsEqual.equalTo; import static org.robolectric.Shadows.shadowOf; @Config(sdk = 21, manifest = "../sample/src/main/AndroidManifest.xml") @RunWith(RobolectricTestRunner.class) public class SecondActivityTest { @Test public void testIntent() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://example.com/deepLink/123/myname")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, SecondActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo("http://example.com/deepLink/123/myname")); } }
5,924
0
Create_ds/DeepLinkDispatch/sample/src/test/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/test/java/com/airbnb/deeplinkdispatch/sample/CustomPrefixesActivityTest.java
package com.airbnb.deeplinkdispatch.sample; import android.content.ComponentName; import android.content.Intent; import android.net.Uri; import androidx.test.core.app.ApplicationProvider; import com.airbnb.deeplinkdispatch.DeepLink; import com.google.common.collect.ImmutableList; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; import org.robolectric.shadows.ShadowActivity; import java.util.List; import static junit.framework.TestCase.assertNull; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.IsEqual.equalTo; import static org.robolectric.Shadows.shadowOf; @Config(sdk = 21, manifest = "../sample/src/main/AndroidManifest.xml") @RunWith(RobolectricTestRunner.class) public class CustomPrefixesActivityTest { @Test public void testAppDeepLinkIntent() { Intent launchedIntent = getLaunchedIntent("app://airbnb/view_users?param=foo"); assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(ApplicationProvider.getApplicationContext(), CustomPrefixesActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo("app://airbnb/view_users?param=foo")); assertThat(launchedIntent.getExtras().getString("param"), equalTo("foo")); } @Test public void testWebDeepLinkIntent() { List<String> cases = ImmutableList.of("http://airbnb.com/users", "https://airbnb.com/users"); for (String uri : cases) { Intent launchedIntent = getLaunchedIntent(uri); assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(ApplicationProvider.getApplicationContext(), CustomPrefixesActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo(uri)); } } @Test public void testWebPlaceholderDeepLinkIntentNotAllowedPlaceholder() { List<String> cases = ImmutableList.of("httpx://airbnb.com/guests", "https://web.airbnb.com/guests", "http://uk.airbnb.com/guests", "https://ru.airbnb.com/guests"); for (String uri : cases) { Intent launchedIntent = getLaunchedIntent(uri); assertNull(launchedIntent); } } @Test public void testWebPlaceholderDeepLinkIntent() { List<String> cases = ImmutableList.of("http://airbnb.com/guests", "https://airbnb.com/guests", "http://de.airbnb.com/guests", "https://de.airbnb.com/guests", "http://ro.airbnb.com/guests"); for (String uri : cases) { Intent launchedIntent = getLaunchedIntent(uri); assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(ApplicationProvider.getApplicationContext(), CustomPrefixesActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo(uri)); } } @Test public void testWebPlaceholderDeepLinkIntentPlaceholderValue() { String uri = "https://de.airbnb.com/guests"; Intent launchedIntent = getLaunchedIntent(uri); assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(ApplicationProvider.getApplicationContext(), CustomPrefixesActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo(uri)); assertThat(launchedIntent.getExtras().getString("scheme"), equalTo("s")); assertThat(launchedIntent.getExtras().getString("host_prefix"), equalTo("de.")); } @Test public void testWebPlaceholderDeepLinkIntentWihtId() { List<String> cases = ImmutableList.of("http://airbnb.com/guest/123", "https://airbnb.com/guest/123", "http://de.airbnb.com/guest/123", "https://de.airbnb.com/guest/123"); for (String uri : cases) { Intent launchedIntent = getLaunchedIntent(uri); assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(ApplicationProvider.getApplicationContext(), CustomPrefixesActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo(uri)); assertThat(launchedIntent.getExtras().getString("id"), equalTo("123")); } } @Test public void testWebDeepLinkIntentWithId() { List<String> cases = ImmutableList.of("http://airbnb.com/user/123", "https://airbnb.com/user/123"); for (String uri : cases) { Intent launchedIntent = getLaunchedIntent(uri); assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(ApplicationProvider.getApplicationContext(), CustomPrefixesActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo(uri)); assertThat(launchedIntent.getExtras().getString("id"), equalTo("123")); } } @Test public void testLibraryDeepLinkIntent() { String uri = "library://dld/library_deeplink"; Intent launchedIntent = getLaunchedIntent(uri); assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(ApplicationProvider.getApplicationContext(), CustomPrefixesActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo(uri)); } @Test public void testLibraryDeepLinkIntentWithId() { String uri = "library://dld/library_deeplink/456"; Intent launchedIntent = getLaunchedIntent(uri); assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(ApplicationProvider.getApplicationContext(), CustomPrefixesActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo(uri)); assertThat(launchedIntent.getExtras().getString("lib_id"), equalTo("456")); } private Intent getLaunchedIntent(String uri) { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); ShadowActivity.IntentForResult intentForResult = shadowActivity.peekNextStartedActivityForResult(); if (intentForResult == null) { return null; } else { return intentForResult.intent; } } }
5,925
0
Create_ds/DeepLinkDispatch/sample/src/test/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/test/java/com/airbnb/deeplinkdispatch/sample/ShadowTaskStackBuilder.java
package com.airbnb.deeplinkdispatch.sample; import android.content.Context; import android.content.Intent; import androidx.core.app.TaskStackBuilder; import androidx.test.core.app.ApplicationProvider; import org.robolectric.annotation.Implementation; import org.robolectric.annotation.Implements; import org.robolectric.annotation.RealObject; import org.robolectric.shadow.api.Shadow; import java.util.ArrayList; @SuppressWarnings({"UnusedDeclaration"}) @Implements(TaskStackBuilder.class) public class ShadowTaskStackBuilder { private final ArrayList<Intent> mIntents = new ArrayList<>(); @RealObject private TaskStackBuilder realTaskStackBuilder; @Implementation public static TaskStackBuilder create(Context context) { return Shadow.newInstanceOf(TaskStackBuilder.class); } @Implementation public TaskStackBuilder addNextIntent(Intent nextIntent) { mIntents.add(nextIntent); return realTaskStackBuilder; } @Implementation public void startActivities() { if (mIntents.isEmpty()) { throw new IllegalStateException( "No intents added to TaskStackBuilder; cannot startActivities"); } Intent[] intents = mIntents.toArray(new Intent[mIntents.size()]); intents[0] = new Intent(intents[0]).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_TASK_ON_HOME); ApplicationProvider.getApplicationContext().startActivities(intents); } @Implementation public int getIntentCount() { return mIntents.size(); } @Implementation public Intent editIntentAt(int index) { return mIntents.get(index); } }
5,926
0
Create_ds/DeepLinkDispatch/sample/src/test/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/test/java/com/airbnb/deeplinkdispatch/sample/MainActivityTest.java
package com.airbnb.deeplinkdispatch.sample; import android.content.ComponentName; import android.content.Intent; import android.net.Uri; import com.airbnb.deeplinkdispatch.DeepLink; import com.airbnb.deeplinkdispatch.DeepLinkDispatch; import com.airbnb.deeplinkdispatch.sample.benchmarkable.BenchmarkDeepLinkModuleRegistry; import com.airbnb.deeplinkdispatch.sample.library.LibraryActivity; import com.airbnb.deeplinkdispatch.sample.library.LibraryDeepLinkModuleRegistry; import com.airbnb.deeplinkdispatch.sample.kaptlibrary.KaptLibraryDeepLinkModuleRegistry; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; import org.robolectric.shadows.ShadowActivity; import org.robolectric.shadows.ShadowApplication; import java.util.HashMap; import java.util.Map; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.robolectric.Shadows.shadowOf; import androidx.core.app.TaskStackBuilder; @Config(sdk = 21, manifest = "../sample/src/main/AndroidManifest.xml", shadows = {ShadowTaskStackBuilder.class}) @RunWith(RobolectricTestRunner.class) public class MainActivityTest { @Test public void testIntent() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://host/somePath/1234321")) .putExtra("TEST_EXTRA", "FOO"); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, MainActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra("arbitraryNumber"), equalTo("1234321")); assertThat(launchedIntent.getStringExtra("TEST_EXTRA"), equalTo("FOO")); assertThat(launchedIntent.getAction(), equalTo("deep_link_complex")); assertThat(launchedIntent.<Uri>getParcelableExtra(DeepLink.REFERRER_URI).toString(), equalTo("dld://host/somePath/1234321")); assertThat(launchedIntent.getData(), equalTo(Uri.parse("dld://host/somePath/1234321"))); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo("dld://host/somePath/1234321")); } @Test public void testIntentViaMethodResult() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://host/methodResult/intent")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, SecondActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getAction(), equalTo(MainActivity.ACTION_DEEP_LINK_INTENT)); } @Test public void testIntentViaInnerClassMethodResult() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://innerClassDeeplink")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, MainActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getAction(), equalTo(MainActivity.ACTION_DEEP_LINK_INNER)); } @Test public void testIntentViaMethodResultWithFinalParameter() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://host/methodResultFinalParameter/intent")); intent.putExtra("finalExtra", "set by launcher"); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, SecondActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getAction(), equalTo(MainActivity.ACTION_DEEP_LINK_INTENT)); assertThat(launchedIntent.getStringExtra("finalExtra"), equalTo("set in app")); } @Test public void testMethodDeeplinkWithOverrideParamAndQueryParam() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://methodDeepLinkOverride/set_in_url?queryParam=set_in_url")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, MainActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getAction(), equalTo(MainActivity.ACTION_DEEP_LINK_INTENT)); assertThat(launchedIntent.getStringExtra("param1"), equalTo("set_in_app")); assertThat(launchedIntent.getStringExtra("queryParam"), equalTo("set_in_app")); } @Test public void testIntentViaMethodResultWithParameter() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://host/methodResult/intent/someValue")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, SecondActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getAction(), equalTo(MainActivity.ACTION_DEEP_LINK_INTENT)); assertThat(launchedIntent.getStringExtra("parameter"), equalTo("someValue")); } @Test public void testTaskStackBuilderViaMethodResult() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://host/methodResult/taskStackBuilder")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowApplication shadowApplication = shadowOf(RuntimeEnvironment.application); Intent launchedIntent = shadowApplication.getNextStartedActivity(); assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, SecondActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getAction(), equalTo(MainActivity.ACTION_DEEP_LINK_TASK_STACK_BUILDER)); Intent parentIntent = shadowApplication.getNextStartedActivity(); assertNotNull(parentIntent); assertThat(parentIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, MainActivity.class))); assertThat(parentIntent.getAction(), equalTo(MainActivity.ACTION_DEEP_LINK_TASK_STACK_BUILDER)); } @Test public void testIntentAndTaskStackBuilderViaMethodResult() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://host/methodResult/intentAndTaskStackBuilder")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowApplication shadowApplication = shadowOf(RuntimeEnvironment.application); Intent launchedIntent = shadowApplication.getNextStartedActivity(); assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, SecondActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getAction(), equalTo(MainActivity.ACTION_DEEP_LINK_INTENT_AND_TASK_STACK_BUILDER)); Intent parentIntent = shadowApplication.getNextStartedActivity(); assertNotNull(parentIntent); assertThat(parentIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, MainActivity.class))); assertThat(parentIntent.getAction(), equalTo(MainActivity.ACTION_DEEP_LINK_INTENT_AND_TASK_STACK_BUILDER)); } @Test public void testPartialSegmentPlaceholderStart() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://example.com/test123bar")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, MainActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra("arg_start"), equalTo("test123")); assertThat(launchedIntent.getAction(), equalTo(Intent.ACTION_VIEW)); assertThat(launchedIntent.getData(), equalTo(Uri.parse("http://example.com/test123bar"))); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo("http://example.com/test123bar")); } @Test public void testPartialSegmentPlaceholderEnd() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://example.com/footest123")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, MainActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra("arg_end"), equalTo("test123")); assertThat(launchedIntent.getAction(), equalTo(Intent.ACTION_VIEW)); assertThat(launchedIntent.getData(), equalTo(Uri.parse("http://example.com/footest123"))); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo("http://example.com/footest123")); } @Test public void testQueryParams() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://classDeepLink?foo=bar")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, MainActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra("foo"), equalTo("bar")); assertThat(launchedIntent.getAction(), equalTo(Intent.ACTION_VIEW)); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo("dld://classDeepLink?foo=bar")); } @Test public void testQueryParamsWithBracket() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://classDeepLink?foo[max]=123")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, MainActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra("foo[max]"), equalTo("123")); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo("dld://classDeepLink?foo[max]=123")); } @Test public void testHttpScheme() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://example.com/fooball?baz=something")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, MainActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra("baz"), equalTo("something")); assertThat(launchedIntent.getStringExtra("arg_end"), equalTo("ball")); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo("http://example.com/fooball?baz=something")); } @Test public void testTaskStackBuilderIntents() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://example.com/deepLink/testid/testname/testplace")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowApplication shadowApplication = shadowOf(RuntimeEnvironment.application); Intent launchedIntent = shadowApplication.getNextStartedActivity(); assertNotNull(launchedIntent); assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, SecondActivity.class))); assertThat(launchedIntent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false), equalTo(true)); assertThat(launchedIntent.getStringExtra("id"), equalTo("testid")); assertThat(launchedIntent.getStringExtra("name"), equalTo("testname")); assertThat(launchedIntent.getStringExtra("place"), equalTo("testplace")); assertThat(launchedIntent.getStringExtra(DeepLink.URI), equalTo("http://example.com/deepLink/testid/testname/testplace")); Intent parentIntent = shadowApplication.getNextStartedActivity(); assertNotNull(parentIntent); assertThat(parentIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, MainActivity.class))); Intent nextNullIntent = shadowApplication.getNextStartedActivity(); assertNull(nextNullIntent); } @Test public void testSupportsUri() throws Exception { Map<String, String> configurablePathSegmentReplacements = new HashMap<>(); configurablePathSegmentReplacements.put("configurable-path-segment", "obamaOs"); configurablePathSegmentReplacements.put("configurable-path-segment-one", "belong"); configurablePathSegmentReplacements.put("configurable-path-segment-two", "anywhere"); DeepLinkDelegate deepLinkDelegate = new DeepLinkDelegate(new SampleModuleRegistry(), new LibraryDeepLinkModuleRegistry(), new BenchmarkDeepLinkModuleRegistry(), new KaptLibraryDeepLinkModuleRegistry(), configurablePathSegmentReplacements); assertThat(deepLinkDelegate.supportsUri("dld://classDeepLink"), equalTo(true)); assertThat(deepLinkDelegate.supportsUri("some://weirdNonExistentUri"), equalTo(false)); } @Test public void testSameLengthComponentsMismatch() throws Exception { Map<String, String> configurablePathSegmentReplacements = new HashMap<>(); configurablePathSegmentReplacements.put("configurable-path-segment", "obamaOs"); configurablePathSegmentReplacements.put("configurable-path-segment-one", "belong"); configurablePathSegmentReplacements.put("configurable-path-segment-two", "anywhere"); DeepLinkDelegate deepLinkDelegate = new DeepLinkDelegate(new SampleModuleRegistry(), new LibraryDeepLinkModuleRegistry(), new BenchmarkDeepLinkModuleRegistry(), new KaptLibraryDeepLinkModuleRegistry(), configurablePathSegmentReplacements); assertThat(deepLinkDelegate.supportsUri("dld://classDeepLink"), equalTo(true)); assertThat(deepLinkDelegate.supportsUri("dld://classDeepLinx"), equalTo(false)); } @Test public void testConfigurablePathSegmentMatch() { Map<String, String> configurablePathSegmentReplacements = new HashMap<>(); configurablePathSegmentReplacements.put("configurable-path-segment", "obamaOs"); configurablePathSegmentReplacements.put("configurable-path-segment-one", "belong"); configurablePathSegmentReplacements.put("configurable-path-segment-two", "anywhere"); DeepLinkDelegate deepLinkDelegate = new DeepLinkDelegate(new SampleModuleRegistry(), new LibraryDeepLinkModuleRegistry(), new BenchmarkDeepLinkModuleRegistry(), new KaptLibraryDeepLinkModuleRegistry(), configurablePathSegmentReplacements); assertThat(deepLinkDelegate.supportsUri("https://www.example.com/capnMcCains/bar"), equalTo(false)); assertThat(deepLinkDelegate.supportsUri("https://www.example.com/obamaOs/bar"), equalTo(true)); } @Test public void testMissingKeysThrowsIAException() { DeepLinkDispatch.setValidationExecutor(TestUtils.getImmediateExecutor()); String message = ""; try { Map<String, String> configurablePathSegmentReplacements = new HashMap<>(); configurablePathSegmentReplacements.put("configurable-path-segment", "obamaOs"); DeepLinkDelegate deepLinkDelegate = new DeepLinkDelegate(new SampleModuleRegistry(), new LibraryDeepLinkModuleRegistry(), new BenchmarkDeepLinkModuleRegistry(), new KaptLibraryDeepLinkModuleRegistry(), configurablePathSegmentReplacements); } catch (IllegalArgumentException e) { message = e.getMessage(); } //Alternatively, we could have used @Test(expected = IllegalArgumentException.class), but I wanted to assert this message. assertEquals("Keys not found in BaseDeepLinkDelegate's mapping of PathVariableReplacementValues. Missing keys are:\n" + "configurable-path-segment-one,\n" + "configurable-path-segment-two.\n" + "Keys in mapping are:\n" + "configurable-path-segment.", message); } @Test public void testPathSegmentUriNoMatch() { Map<String, String> configurablePathSegmentReplacements = new HashMap<>(); configurablePathSegmentReplacements.put("configurable-path-segment", "obamaOs"); configurablePathSegmentReplacements.put("configurable-path-segment-one", "belong"); configurablePathSegmentReplacements.put("configurable-path-segment-two", "anywhere"); DeepLinkDelegate deepLinkDelegate = new DeepLinkDelegate(new SampleModuleRegistry(), new LibraryDeepLinkModuleRegistry(), new BenchmarkDeepLinkModuleRegistry(), new KaptLibraryDeepLinkModuleRegistry(), configurablePathSegmentReplacements); assertThat(deepLinkDelegate.supportsUri("https://www.example.com/<capnMccains>/bar"), equalTo(false)); assertThat(deepLinkDelegate.supportsUri("https://www.example.com/<obamaOs>/bar"), equalTo(false)); } @Test public void testTwoConfigurablePathSegmentsMatch() { Map<String, String> configurablePathSegmentReplacements = new HashMap<>(); configurablePathSegmentReplacements.put("configurable-path-segment", "obamaOs"); configurablePathSegmentReplacements.put("configurable-path-segment-one", "belong"); configurablePathSegmentReplacements.put("configurable-path-segment-two", "anywhere"); DeepLinkDelegate deepLinkDelegate = new DeepLinkDelegate(new SampleModuleRegistry(), new LibraryDeepLinkModuleRegistry(), new BenchmarkDeepLinkModuleRegistry(), new KaptLibraryDeepLinkModuleRegistry(), configurablePathSegmentReplacements); assertThat(deepLinkDelegate.supportsUri("https://www.example.com/anywhere/belong/foo"), equalTo(false)); assertThat(deepLinkDelegate.supportsUri("https://www.example.com/belong/anywhere/foo"), equalTo(true)); } @Test public void testMoreConcreteMatch() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("placeholder://host/somePathOne/somePathTwo/somePathThree")); testMatchConcreteness(intent); } @Test public void testMoreConcreteMatchAlt() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("placeholder://host/somePathOneAlt/somePathTwoAlt/somePathThreeAlt")); testMatchConcreteness(intent); } @Test public void testMoreConcreteMatchMany() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("placeholder://host/somePathOneMany/somePathTwoMany/somePathThreeMany")); testMatchConcreteness(intent); } private void testMatchConcreteness(Intent intent) { DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); Intent launchedIntent = shadowActivity.peekNextStartedActivityForResult().intent; assertThat(launchedIntent.getComponent(), equalTo(new ComponentName(deepLinkActivity, LibraryActivity.class))); } @Test public void testNullDeepLinkMethodResult() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://host/methodResult/null")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); assertNull(shadowActivity.peekNextStartedActivityForResult()); } @Test public void testNullTaskStackBuilder() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://host/taskStackBuilder/null")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); assertNull(shadowActivity.peekNextStartedActivityForResult()); } @Test public void testNullIntent() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("dld://host/intent/null")); DeepLinkActivity deepLinkActivity = Robolectric.buildActivity(DeepLinkActivity.class, intent) .create().get(); ShadowActivity shadowActivity = shadowOf(deepLinkActivity); assertNull(shadowActivity.peekNextStartedActivityForResult()); } }
5,927
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/CustomPrefixesActivity.java
package com.airbnb.deeplinkdispatch.sample; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import android.text.TextUtils; import android.util.Log; import android.widget.Toast; import com.airbnb.deeplinkdispatch.DeepLink; import com.airbnb.deeplinkdispatch.sample.library.LibraryDeepLink; /** * Main airbnb activity to show case {@link AppDeepLink}, {@link WebDeepLink} and {@link LibraryDeepLink}. */ @AppDeepLink({ "/view_users" }) @WebDeepLink({ "/users", "/user/{id}" }) @WebPlaceholderDeepLink({ "/guests", "/guest/{id}" }) @LibraryDeepLink({ "/library_deeplink", "/library_deeplink/{lib_id}" }) public class CustomPrefixesActivity extends AppCompatActivity { private static final String TAG = CustomPrefixesActivity.class.getSimpleName(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.sample_activity_main); if (getIntent().getBooleanExtra(DeepLink.IS_DEEP_LINK, false)) { Bundle parameters = getIntent().getExtras(); Log.d(TAG, "Deeplink params: " + parameters); String idString = parameters.getString("id"); if (!TextUtils.isEmpty(idString)) { showToast("class id== " + idString); } else { showToast("no id in the deeplink"); } } else { showToast("no deep link :( "); } } private void showToast(String message) { Toast.makeText(this, "Deep Link: " + message, Toast.LENGTH_SHORT).show(); } }
5,928
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/WebDeepLink.java
package com.airbnb.deeplinkdispatch.sample; import com.airbnb.deeplinkdispatch.DeepLinkSpec; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @DeepLinkSpec(prefix = { "http://airbnb.com", "https://airbnb.com" }) // When using tools like Dexguard we require these annotations to still be inside the .dex files // produced by D8 but because of this bug https://issuetracker.google.com/issues/168524920 they // are not so we need to mark them as RetentionPolicy.RUNTIME. @Retention(RetentionPolicy.RUNTIME) public @interface WebDeepLink { String[] value(); }
5,929
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/SampleApplication.java
package com.airbnb.deeplinkdispatch.sample; import android.app.Application; import android.content.IntentFilter; import androidx.localbroadcastmanager.content.LocalBroadcastManager; import com.airbnb.deeplinkdispatch.DeepLinkHandler; public class SampleApplication extends Application { @Override public void onCreate() { super.onCreate(); IntentFilter intentFilter = new IntentFilter(DeepLinkHandler.ACTION); LocalBroadcastManager.getInstance(this).registerReceiver(new DeepLinkReceiver(), intentFilter); } }
5,930
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/WebPlaceholderDeepLink.java
package com.airbnb.deeplinkdispatch.sample; import com.airbnb.deeplinkdispatch.DeepLinkSpec; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @DeepLinkSpec(prefix = { "http{scheme(|s)}://{host_prefix(|de.|ro.|www.)}airbnb.com" }) // When using tools like Dexguard we require these annotations to still be inside the .dex files // produced by D8 but because of this bug https://issuetracker.google.com/issues/168524920 they // are not so we need to mark them as RetentionPolicy.RUNTIME. @Retention(RetentionPolicy.RUNTIME) public @interface WebPlaceholderDeepLink { String[] value(); }
5,931
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/DeepLinkActivity.java
package com.airbnb.deeplinkdispatch.sample; import android.app.Activity; import android.os.Bundle; import com.airbnb.deeplinkdispatch.DeepLinkHandler; import com.airbnb.deeplinkdispatch.sample.benchmarkable.BenchmarkDeepLinkModule; import com.airbnb.deeplinkdispatch.sample.benchmarkable.BenchmarkDeepLinkModuleRegistry; import com.airbnb.deeplinkdispatch.sample.kaptlibrary.KaptLibraryDeepLinkModule; import com.airbnb.deeplinkdispatch.sample.kaptlibrary.KaptLibraryDeepLinkModuleRegistry; import com.airbnb.deeplinkdispatch.sample.library.LibraryDeepLinkModule; import com.airbnb.deeplinkdispatch.sample.library.LibraryDeepLinkModuleRegistry; import java.util.HashMap; import java.util.Map; @DeepLinkHandler({SampleModule.class, LibraryDeepLinkModule.class, BenchmarkDeepLinkModule.class, KaptLibraryDeepLinkModule.class}) public class DeepLinkActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Debug.startMethodTracing("deeplink.trace",90000000); Map configurablePlaceholdersMap = new HashMap(); configurablePlaceholdersMap.put("configPathOne", "somePathThree"); configurablePlaceholdersMap.put("configurable-path-segment-one", ""); configurablePlaceholdersMap.put("configurable-path-segment", ""); configurablePlaceholdersMap.put("configurable-path-segment-two", ""); configurablePlaceholdersMap.put("configPathOne", "somePathOne"); DeepLinkDelegate deepLinkDelegate = new DeepLinkDelegate( new SampleModuleRegistry(), new LibraryDeepLinkModuleRegistry(), new BenchmarkDeepLinkModuleRegistry(), new KaptLibraryDeepLinkModuleRegistry(), configurablePlaceholdersMap); deepLinkDelegate.dispatchFrom(this); // Debug.stopMethodTracing(); finish(); } }
5,932
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/AppDeepLink.java
package com.airbnb.deeplinkdispatch.sample; import com.airbnb.deeplinkdispatch.DeepLinkSpec; @DeepLinkSpec(prefix = { "app://airbnb" }) public @interface AppDeepLink { String[] value(); }
5,933
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/SecondActivity.java
package com.airbnb.deeplinkdispatch.sample; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import android.text.TextUtils; import android.util.Log; import android.widget.Toast; import com.airbnb.deeplinkdispatch.DeepLink; // You can have multiple path parameters in the URI - both must be present @DeepLink("http://example.com/deepLink/{id}/{name}") public class SecondActivity extends AppCompatActivity { private static final String TAG = SecondActivity.class.getSimpleName(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.sample_activity_main); if (getIntent().getBooleanExtra(DeepLink.IS_DEEP_LINK, false)) { Bundle parameters = getIntent().getExtras(); Log.d(TAG, "Deeplink params: " + parameters); String idString = parameters.getString("id"); String name = parameters.getString("name"); if (!TextUtils.isEmpty(idString)) { showToast("class id== " + idString + " and name==" + name); } else { showToast("no id in the deeplink"); } } else { showToast("no deep link :( "); } } private void showToast(String message) { Toast.makeText(this, "Deep Link: " + message, Toast.LENGTH_SHORT).show(); } }
5,934
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/DeepLinkReceiver.java
package com.airbnb.deeplinkdispatch.sample; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; import com.airbnb.deeplinkdispatch.DeepLinkHandler; public class DeepLinkReceiver extends BroadcastReceiver { private static final String TAG = DeepLinkReceiver.class.getSimpleName(); @Override public void onReceive(Context context, Intent intent) { String deepLinkUri = intent.getStringExtra(DeepLinkHandler.EXTRA_URI); if (intent.getBooleanExtra(DeepLinkHandler.EXTRA_SUCCESSFUL, false)) { Log.i(TAG, "Success deep linking: " + deepLinkUri); } else { String errorMessage = intent.getStringExtra(DeepLinkHandler.EXTRA_ERROR_MESSAGE); Log.e(TAG, "Error deep linking: " + deepLinkUri + " with error message +" + errorMessage); } } }
5,935
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/handler/TestJavaDeepLinkHandlerDeepLinkArgs.java
package com.airbnb.deeplinkdispatch.sample.handler; import com.airbnb.deeplinkdispatch.handler.DeepLinkParamType; import com.airbnb.deeplinkdispatch.handler.DeeplinkParam; public class TestJavaDeepLinkHandlerDeepLinkArgs { private final long uuid; private final String name; private final float number; private final boolean flag; private final Boolean showTaxes; private final Integer queryParam; public TestJavaDeepLinkHandlerDeepLinkArgs( // path params can be non null @DeeplinkParam(name = "path_segment_variable_1", type = DeepLinkParamType.Path) long uuid, @DeeplinkParam(name = "path_segment_variable_2", type = DeepLinkParamType.Path) String name, @DeeplinkParam(name = "path_segment_variable_3", type = DeepLinkParamType.Path) float number, @DeeplinkParam(name = "path_segment_variable_4", type = DeepLinkParamType.Path) boolean flag, @DeeplinkParam(name = "show_taxes", type = DeepLinkParamType.Query) Boolean showTaxes, @DeeplinkParam(name = "queryParam", type = DeepLinkParamType.Query) Integer queryParam ) { this.uuid = uuid; this.name = name; this.number = number; this.flag = flag; this.showTaxes = showTaxes; this.queryParam = queryParam; } @Override public String toString() { return "TestJavaDeepLinkHandlerDeepLinkArgs{" + "uuid=" + uuid + ", name='" + name + '\'' + ", number=" + number + ", flag=" + flag + ", showTaxes=" + showTaxes + ", queryParam=" + queryParam + '}'; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TestJavaDeepLinkHandlerDeepLinkArgs that = (TestJavaDeepLinkHandlerDeepLinkArgs) o; if (uuid != that.uuid) return false; if (Float.compare(that.number, number) != 0) return false; if (flag != that.flag) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (showTaxes != null ? !showTaxes.equals(that.showTaxes) : that.showTaxes != null) return false; return queryParam != null ? queryParam.equals(that.queryParam) : that.queryParam == null; } @Override public int hashCode() { int result = (int) (uuid ^ (uuid >>> 32)); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (number != +0.0f ? Float.floatToIntBits(number) : 0); result = 31 * result + (flag ? 1 : 0); result = 31 * result + (showTaxes != null ? showTaxes.hashCode() : 0); result = 31 * result + (queryParam != null ? queryParam.hashCode() : 0); return result; } }
5,936
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/handler/SampleJavaStaticTestHelper.java
package com.airbnb.deeplinkdispatch.sample.handler; import android.content.Context; import android.util.Log; public class SampleJavaStaticTestHelper { public static void invokedHandler(Context context, TestJavaDeepLinkHandlerDeepLinkArgs parameters) { Log.d("JavaDeeplinkHandler", "Received handler call with " + parameters.toString()); } }
5,937
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/handler/SampleJavaDeeplinkHandler.java
package com.airbnb.deeplinkdispatch.sample.handler; import android.content.Context; import androidx.annotation.NonNull; import com.airbnb.deeplinkdispatch.handler.DeepLinkHandler; import com.airbnb.deeplinkdispatch.sample.WebDeepLink; @WebDeepLink({"/java/{path_segment_variable_1}/{path_segment_variable_2}/{path_segment_variable_3}/{path_segment_variable_4}?show_taxes={query_param_1}&queryParam={query_param_2}"}) public class SampleJavaDeeplinkHandler implements DeepLinkHandler<TestJavaDeepLinkHandlerDeepLinkArgs> { @Override public void handleDeepLink(@NonNull Context context, TestJavaDeepLinkHandlerDeepLinkArgs parameters) { SampleJavaStaticTestHelper.invokedHandler(context, parameters); /** * From here any internal/3rd party navigation framework can be called the provided args. */ } }
5,938
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/typeconversion/ComparableColorDrawable.java
package com.airbnb.deeplinkdispatch.sample.typeconversion; import android.graphics.drawable.ColorDrawable; import androidx.annotation.Nullable; /** * So we can actually use this in tests to comapre to expected. */ public class ComparableColorDrawable extends ColorDrawable { public ComparableColorDrawable(int i) { super(i); } @Override public boolean equals(@Nullable Object obj) { return obj instanceof ColorDrawable && ((ColorDrawable) obj).getColor() == this.getColor(); } }
5,939
0
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample
Create_ds/DeepLinkDispatch/sample/src/main/java/com/airbnb/deeplinkdispatch/sample/typeconversion/TypeConversionErrorHandlerCustomTypeDeepLinkActivity.java
package com.airbnb.deeplinkdispatch.sample.typeconversion; import android.app.Activity; import android.os.Bundle; import android.util.Log; import com.airbnb.deeplinkdispatch.DeepLinkHandler; import com.airbnb.deeplinkdispatch.DeepLinkUri; import com.airbnb.deeplinkdispatch.handler.TypeConverters; import com.airbnb.deeplinkdispatch.sample.SampleModule; import com.airbnb.deeplinkdispatch.sample.SampleModuleRegistry; import com.airbnb.deeplinkdispatch.sample.benchmarkable.BenchmarkDeepLinkModule; import com.airbnb.deeplinkdispatch.sample.benchmarkable.BenchmarkDeepLinkModuleRegistry; import com.airbnb.deeplinkdispatch.sample.kaptlibrary.KaptLibraryDeepLinkModule; import com.airbnb.deeplinkdispatch.sample.kaptlibrary.KaptLibraryDeepLinkModuleRegistry; import com.airbnb.deeplinkdispatch.sample.library.LibraryDeepLinkModule; import com.airbnb.deeplinkdispatch.sample.library.LibraryDeepLinkModuleRegistry; import java.lang.reflect.Type; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function3; @DeepLinkHandler({SampleModule.class, LibraryDeepLinkModule.class, BenchmarkDeepLinkModule.class, KaptLibraryDeepLinkModule.class}) public class TypeConversionErrorHandlerCustomTypeDeepLinkActivity extends Activity { private static final String TAG = "ErrorHandlerCustomType"; List<String> stringList; private TypeConverters typeConverters; @Override protected void onCreate(Bundle savedInstanceState) { typeConverters = new TypeConverters(); typeConverters.put(ComparableColorDrawable.class, value -> { switch (value.toLowerCase()) { case "red": return new ComparableColorDrawable(0xff0000ff); case "green": return new ComparableColorDrawable(0x00ff00ff); case "blue": return new ComparableColorDrawable(0x000ffff); default: return new ComparableColorDrawable(0xffffffff); } }); try { // Not very elegant reflection way to get the right type to add to the mapper. typeConverters.put(TypeConversionErrorHandlerCustomTypeDeepLinkActivity.class.getDeclaredField("stringList").getGenericType(), value -> Arrays.asList(value.split(","))); } catch (NoSuchFieldException e) { e.printStackTrace(); } Function3<DeepLinkUri, Type, ? super String, Integer> typeConversionErrorNullable = (Function3<DeepLinkUri, Type, String, Integer>) (uriTemplate, type, s) -> { Log.e(TAG, "Unable to convert " + s + " used in urlTemplate " + uriTemplate + " to a " + type + ". Returning null."); throw new NumberFormatException("For input string: \"" + s + "\""); }; Function3<DeepLinkUri, Type, ? super String, Integer> typeConversionErrorNonNullable = (Function3<DeepLinkUri, Type, String, Integer>) (uriTemplate, type, s) -> { Log.e(TAG, "Unable to convert " + s + " used in urlTemplate " + uriTemplate + " to a " + type + ". Returning 0."); throw new NumberFormatException("For input string: \"" + s + "\""); }; Function0<TypeConverters> typeConvertersLambda = () -> typeConverters; super.onCreate(savedInstanceState); Map configurablePlaceholdersMap = new HashMap(); configurablePlaceholdersMap.put("configPathOne", "somePathThree"); configurablePlaceholdersMap.put("configurable-path-segment-one", ""); configurablePlaceholdersMap.put("configurable-path-segment", ""); configurablePlaceholdersMap.put("configurable-path-segment-two", ""); configurablePlaceholdersMap.put("configPathOne", "somePathOne"); DeepLinkDelegate deepLinkDelegate = new DeepLinkDelegate( new SampleModuleRegistry(), new LibraryDeepLinkModuleRegistry(), new BenchmarkDeepLinkModuleRegistry(), new KaptLibraryDeepLinkModuleRegistry(), configurablePlaceholdersMap, typeConvertersLambda, typeConversionErrorNullable, typeConversionErrorNonNullable); deepLinkDelegate.dispatchFrom(this); finish(); } }
5,940
0
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb/deeplinkdispatch/DeepLinkModule.java
package com.airbnb.deeplinkdispatch; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * This annotation indicates to DeepLinkDispatch that a {@code Registry} class should be generated. * Registry classes collect all the {@link DeepLink} annotations from your code and keep them in a * registry. This registry is then used by {@code DeepLinkDelegate} in order to decide which * Activity will receive each incoming deep link. * For example, if you annotated a class {@code FooBar} with {@link DeepLinkModule}, then * DeepLinkDispatch will generate a class called {@code FooBarRegistry}. Also, {@code FooBar} will * be added as a constructor argument to the {@code DeepLinkDelegate} class, so it can be used for * Intent delivery. */ @Target({ ElementType.TYPE }) @Retention(RetentionPolicy.CLASS) public @interface DeepLinkModule { }
5,941
0
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb/deeplinkdispatch/DeepLinkHandler.java
/* * Copyright (C) 2015 Airbnb, Inc. * * Licensed 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.airbnb.deeplinkdispatch; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Indicates that the annotated {@code Activity} will receive deep links and handle them. This * will tell DeepLinkDispatch to generate a {@code DeepLinkDelegate} class that forwards the * incoming {@code Intent} to the correct Activities annotated with {@link DeepLink}. */ @Target({ ElementType.TYPE }) @Retention(RetentionPolicy.CLASS) public @interface DeepLinkHandler { /** * A list of {@link DeepLinkModule} annotated classes used for collecting all the deep links in * an application. The generated {@code DeepLinkDelegate} class will query the provided modules * in order to decide which {@code Activity} should receive the incoming deep link. */ Class<?>[] value(); String ACTION = "com.airbnb.deeplinkdispatch.DEEPLINK_ACTION"; String EXTRA_SUCCESSFUL = "com.airbnb.deeplinkdispatch.EXTRA_SUCCESSFUL"; String EXTRA_URI = "com.airbnb.deeplinkdispatch.EXTRA_URI"; String EXTRA_URI_TEMPLATE = "com.airbnb.deeplinkdispatch.EXTRA_URI_TEMPLATE"; String EXTRA_ERROR_MESSAGE = "com.airbnb.deeplinkdispatch.EXTRA_ERROR_MESSAGE"; }
5,942
0
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb/deeplinkdispatch/DeepLinkSpec.java
/* * Copyright (C) 2015 Airbnb, Inc. * * Licensed 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.airbnb.deeplinkdispatch; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Declare a specification for a type of DeepLink. For example: * <pre><code> * {@literal @}DeepLinkSpec( * prefix = { "http://example.com", "https://example.com" }) * public{@literal @}interface WebDeepLink { * String[] value(); * } * </code></pre> * <p> * <code>{@literal @}WebDeepLink({ "/foo", "/bar" })</code> will match any of * <ul> * <li>http://example.com/foo</li> * <li>https://example.com/foo</li> * <li>http://example.com/bar</li> * <li>https://example.com/bar</li> * </ul> */ @Target({ ElementType.ANNOTATION_TYPE }) // When using tools like Dexguard we require these annotations to still be inside the .dex files // produced by D8 but because of this bug https://issuetracker.google.com/issues/168524920 they // are not so we need to mark them as RetentionPolicy.RUNTIME. @Retention(RetentionPolicy.RUNTIME) public @interface DeepLinkSpec { String[] prefix(); }
5,943
0
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb/deeplinkdispatch/DeepLink.java
/* * Copyright (C) 2015 Airbnb, Inc. * * Licensed 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.airbnb.deeplinkdispatch; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Register a class or method to handle a deep link. * <pre><code> * {@literal @}DeepLink(uri); * </code></pre> */ @Target({ ElementType.TYPE, ElementType.METHOD }) // When using tools like Dexguard we require these annotations to still be inside the .dex files // produced by D8 but because of this bug https://issuetracker.google.com/issues/168524920 they // are not so we need to mark them as RetentionPolicy.RUNTIME. @Retention(RetentionPolicy.RUNTIME) public @interface DeepLink { String IS_DEEP_LINK = "is_deep_link_flag"; String URI = "deep_link_uri"; String REFERRER_URI = "android.intent.extra.REFERRER"; String[] value(); }
5,944
0
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb/deeplinkdispatch/Test.java
/* * Copyright (C) 2015 Airbnb, Inc. * * Licensed 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.airbnb.deeplinkdispatch; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Register a class or method to handle a deep link. * <pre><code> * {@literal @}DeepLink(uri); * </code></pre> */ @Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RetentionPolicy.CLASS) public @interface Test { String IS_DEEP_LINK = "is_deep_link_flag"; String URI = "deep_link_uri"; String REFERRER_URI = "android.intent.extra.REFERRER"; int value(); }
5,945
0
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb/deeplinkdispatch/DeepLinkUri.java
/* * Copyright (C) 2015 Square, Inc. * * Licensed 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.airbnb.deeplinkdispatch; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import org.jetbrains.annotations.NotNull; import java.io.EOFException; import java.net.IDN; import java.net.InetAddress; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import okio.Buffer; /** * Adapted from OkHttp's HttpUrl class. Changes are: * * Allow any scheme, instead of just http or https. * * when parsing via parseTemplate(url) allow placeholder chars({}) in url. * * https://github.com/square/okhttp/blob/master/okhttp/src/main/java/com/squareup/okhttp/ * HttpUri.java */ public final class DeepLinkUri { private static final char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; static final String USERNAME_ENCODE_SET = " \"':;<=>@[]^`{}|/\\?#"; static final String PASSWORD_ENCODE_SET = " \"':;<=>@[]^`{}|/\\?#"; static final String PATH_SEGMENT_ENCODE_SET = " \"<>^`{}|/\\?#"; static final String QUERY_ENCODE_SET = " \"'<>#"; static final String QUERY_COMPONENT_ENCODE_SET = " \"'<>#&="; static final String CONVERT_TO_URI_ENCODE_SET = "^`{}|\\"; static final String FORM_ENCODE_SET = " \"':;<=>@[]^`{}|/\\?#&!$(),~"; static final String FRAGMENT_ENCODE_SET = ""; static final Pattern PLACEHOLDER_REGEX = Pattern.compile("\\{(.*?)\\}"); /** Either "http" or "https". */ private final String scheme; /** Decoded username. */ private final String username; /** Decoded password. */ private final String password; /** Canonical hostname. */ private final String host; /** Either 80, 443 or a user-specified port. In range [1..65535]. */ private final int port; /** * A list of canonical path segments. This list always contains at least one element, which may * be the empty string. Each segment is formatted with a leading '/', so if path segments were * ["a", "b", ""], then the encoded path would be "/a/b/". */ private final List<String> pathSegments; /** * Alternating, decoded query names and values, or null for no query. Names may be empty or * non-empty, but never null. Values are null if the name has no corresponding '=' separator, or * empty, or non-empty. */ private final @Nullable List<String> queryNamesAndValues; /** Decoded fragment. */ private final String fragment; /** Canonical URL. */ private final String url; private String urlTemplate; private DeepLinkUri(Builder builder, String urlTemplate) { this.scheme = builder.scheme; this.username = percentDecode(builder.encodedUsername); this.password = percentDecode(builder.encodedPassword); this.host = builder.host; this.port = builder.effectivePort(); this.pathSegments = percentDecode(builder.encodedPathSegments); this.queryNamesAndValues = builder.encodedQueryNamesAndValues != null ? percentDecode(builder.encodedQueryNamesAndValues) : null; this.fragment = builder.encodedFragment != null ? percentDecode(builder.encodedFragment) : null; this.url = builder.toString(); this.urlTemplate = urlTemplate; } /** Returns this URL as a {@link URL java.net.URL}. */ URL url() { try { return new URL(url); } catch (MalformedURLException e) { throw new RuntimeException(e); // Unexpected! } } /** * Attempt to convert this URL to a {@link URI java.net.URI}. This method throws an unchecked * {@link IllegalStateException} if the URL it holds isn't valid by URI's overly-stringent * standard. For example, URI rejects paths containing the '[' character. Consult that class for * the exact rules of what URLs are permitted. */ URI uri() { try { String uriSafeUrl = canonicalize(url, CONVERT_TO_URI_ENCODE_SET, true, false); return new URI(uriSafeUrl); } catch (URISyntaxException e) { throw new IllegalStateException("not valid as a java.net.URI: " + url); } } /** Returns either "http" or "https". */ String scheme() { return scheme; } boolean isHttps() { return scheme.equals("https"); } /** Returns the username, or an empty string if none is set. */ String encodedUsername() { if (username.isEmpty()) return ""; int usernameStart = scheme.length() + 3; // "://".length() == 3. int usernameEnd = delimiterOffset(url, usernameStart, url.length(), ":@"); return url.substring(usernameStart, usernameEnd); } String username() { return username; } /** Returns the password, or an empty string if none is set. */ String encodedPassword() { if (password.isEmpty()) return ""; int passwordStart = url.indexOf(':', scheme.length() + 3) + 1; int passwordEnd = url.indexOf('@'); return url.substring(passwordStart, passwordEnd); } /** Returns the decoded password, or an empty string if none is present. */ String password() { return password; } /** * Returns the host address suitable for use with {@link InetAddress#getAllByName(String)}. May * be: * <ul> * <li>A regular host name, like {@code android.com}. * <li>An IPv4 address, like {@code 127.0.0.1}. * <li>An IPv6 address, like {@code ::1}. Note that there are no square braces. * <li>An encoded IDN, like {@code xn--n3h.net}. * </ul> */ String host() { return host; } String encodedHost() { return canonicalize(host, DeepLinkUri.CONVERT_TO_URI_ENCODE_SET, true, true); } /** * Returns the explicitly-specified port if one was provided, or the default port for this URL's * scheme. For example, this returns 8443 for {@code https://square.com:8443/} and 443 for {@code * https://square.com/}. The result is in {@code [1..65535]}. */ int port() { return port; } /** * Returns 80 if {@code scheme.equals("http")}, 443 if {@code scheme.equals("https")} and -1 * otherwise. */ static int defaultPort(String scheme) { if (scheme.equals("http")) { return 80; } else if (scheme.equals("https")) { return 443; } else { return -1; } } int pathSize() { return pathSegments.size(); } /** * Returns the entire path of this URL, encoded for use in HTTP resource resolution. The * returned path is always nonempty and is prefixed with {@code /}. */ String encodedPath() { int pathStart = url.indexOf('/', scheme.length() + 3); // "://".length() == 3. int pathEnd = delimiterOffset(url, pathStart, url.length(), "?#"); return url.substring(pathStart, pathEnd); } static void pathSegmentsToString(StringBuilder out, List<String> pathSegments) { for (int i = 0, size = pathSegments.size(); i < size; i++) { out.append('/'); out.append(pathSegments.get(i)); } } List<String> encodedPathSegments() { int pathStart = url.indexOf('/', scheme.length() + 3); int pathEnd = delimiterOffset(url, pathStart, url.length(), "?#"); List<String> result = new ArrayList<>(); for (int i = pathStart; i < pathEnd;) { i++; // Skip the '/'. int segmentEnd = delimiterOffset(url, i, pathEnd, "/"); result.add(url.substring(i, segmentEnd)); i = segmentEnd; } return result; } List<String> pathSegments() { return pathSegments; } /** * Returns the query of this URL, encoded for use in HTTP resource resolution. The returned string * may be null (for URLs with no query), empty (for URLs with an empty query) or non-empty (all * other URLs). */ String encodedQuery() { if (queryNamesAndValues == null) return null; // No query. int queryStart = url.indexOf('?') + 1; int queryEnd = delimiterOffset(url, queryStart + 1, url.length(), "#"); return url.substring(queryStart, queryEnd); } static void namesAndValuesToQueryString(StringBuilder out, List<String> namesAndValues) { for (int i = 0, size = namesAndValues.size(); i < size; i += 2) { String name = namesAndValues.get(i); String value = namesAndValues.get(i + 1); if (i > 0) out.append('&'); out.append(name); if (value != null) { out.append('='); out.append(value); } } } /** * Cuts {@code encodedQuery} up into alternating parameter names and values. This divides a * query string like {@code subject=math&easy&problem=5-2=3} into the list {@code ["subject", * "math", "easy", null, "problem", "5-2=3"]}. Note that values may be null and may contain * '=' characters. */ static List<String> queryStringToNamesAndValues(String encodedQuery) { List<String> result = new ArrayList<>(); for (int pos = 0; pos <= encodedQuery.length();) { int ampersandOffset = encodedQuery.indexOf('&', pos); if (ampersandOffset == -1) ampersandOffset = encodedQuery.length(); int equalsOffset = encodedQuery.indexOf('=', pos); if (equalsOffset == -1 || equalsOffset > ampersandOffset) { result.add(encodedQuery.substring(pos, ampersandOffset)); result.add(null); // No value for this name. } else { result.add(encodedQuery.substring(pos, equalsOffset)); result.add(encodedQuery.substring(equalsOffset + 1, ampersandOffset)); } pos = ampersandOffset + 1; } return result; } String query() { if (queryNamesAndValues == null) return null; // No query. StringBuilder result = new StringBuilder(); namesAndValuesToQueryString(result, queryNamesAndValues); return result.toString(); } public @NonNull Set<String> getSchemeHostPathPlaceholders() { if (toTemplateString() == null) return Collections.emptySet(); if (this.query() == null || this.query().isEmpty()) return getPlaceHolders(toTemplateString()); return getPlaceHolders( toTemplateString().substring(0, toTemplateString().indexOf(this.query())) ); } @NotNull private static Set<String> getPlaceHolders(String input) { final Matcher matcher = PLACEHOLDER_REGEX.matcher(input); Set<String> placeholders = new HashSet<>(matcher.groupCount()); while (matcher.find()) { for (int i = 1; i <= matcher.groupCount(); i++) { placeholders.add(matcher.group(i)); } } return placeholders; } @Nullable List<String> getQueryNamesAndValues() { return queryNamesAndValues; } int querySize() { return queryNamesAndValues != null ? queryNamesAndValues.size() / 2 : 0; } /** * Returns the first query parameter named {@code name} decoded using UTF-8, or null if there is * no such query parameter. */ String queryParameter(String name) { if (queryNamesAndValues == null) return null; for (int i = 0, size = queryNamesAndValues.size(); i < size; i += 2) { if (name.equals(queryNamesAndValues.get(i))) { return queryNamesAndValues.get(i + 1); } } return null; } public Set<String> queryParameterNames() { if (queryNamesAndValues == null) return Collections.emptySet(); Set<String> result = new LinkedHashSet<>(); for (int i = 0, size = queryNamesAndValues.size(); i < size; i += 2) { result.add(queryNamesAndValues.get(i)); } return Collections.unmodifiableSet(result); } public List<String> queryParameterValues(String name) { if (queryNamesAndValues == null) return Collections.emptyList(); List<String> result = new ArrayList<>(); for (int i = 0, size = queryNamesAndValues.size(); i < size; i += 2) { if (name.equals(queryNamesAndValues.get(i))) { result.add(queryNamesAndValues.get(i + 1)); } } return Collections.unmodifiableList(result); } String queryParameterName(int index) { return queryNamesAndValues.get(index * 2); } String queryParameterValue(int index) { return queryNamesAndValues.get(index * 2 + 1); } String encodedFragment() { if (fragment == null) return null; int fragmentStart = url.indexOf('#') + 1; return url.substring(fragmentStart); } String fragment() { return fragment; } /** Returns the URL that would be retrieved by following {@code link} from this URL. */ DeepLinkUri resolve(String link) { Builder builder = new Builder(); Builder.ParseResult result = builder.parse(this, link, false); return result == Builder.ParseResult.SUCCESS ? builder.build() : null; } Builder newBuilder() { Builder result = new Builder(); result.scheme = scheme; result.encodedUsername = encodedUsername(); result.encodedPassword = encodedPassword(); result.host = host; result.port = port; result.encodedPathSegments.clear(); result.encodedPathSegments.addAll(encodedPathSegments()); result.encodedQuery(encodedQuery()); result.encodedFragment = encodedFragment(); return result; } /** * Returns a new {@code DeepLinkUri} representing {@code url} if it is a well-formed HTTP or HTTPS * URL, or null if it isn't. */ public static DeepLinkUri parse(String url) { return parse(url, false); } /** * Like parse(String url) but allow '{' '}' chars in scheme to allow using placeholders in scheme. * * @param url * @return */ public static DeepLinkUri parseTemplate(String url) { return parse(url, true); } private static DeepLinkUri parse(String url, boolean allowPlaceholderInScheme) { Builder builder = new Builder(); Builder.ParseResult result = builder.parse(null, url, allowPlaceholderInScheme); return result == Builder.ParseResult.SUCCESS ? builder.build() : null; } /** * Returns an {@link DeepLinkUri} for {@code url} if its protocol is {@code http} or * {@code https}, or null if it has any other protocol. */ static DeepLinkUri get(URL url) { return parse(url.toString()); } /** * Returns a new {@code DeepLinkUri} representing {@code url} if it is a well-formed HTTP or HTTPS * URL, or throws an exception if it isn't. * * @throws MalformedURLException if there was a non-host related URL issue * @throws UnknownHostException if the host was invalid */ static DeepLinkUri getChecked(String url) throws MalformedURLException, UnknownHostException { Builder builder = new Builder(); Builder.ParseResult result = builder.parse(null, url, false); switch (result) { case SUCCESS: return builder.build(); case INVALID_HOST: throw new UnknownHostException("Invalid host: " + url); case UNSUPPORTED_SCHEME: case MISSING_SCHEME: case INVALID_PORT: default: throw new MalformedURLException("Invalid URL: " + result + " for " + url); } } static DeepLinkUri get(URI uri) { return parse(uri.toString()); } @Override public boolean equals(Object o) { return o instanceof DeepLinkUri && ((DeepLinkUri) o).url.equals(url); } @Override public int hashCode() { return url.hashCode(); } @Override public String toString() { return url; } public String toTemplateString() { return urlTemplate; } static final class Builder { String scheme; String encodedUsername = ""; String encodedPassword = ""; String host; int port = -1; final List<String> encodedPathSegments = new ArrayList<>(); List<String> encodedQueryNamesAndValues; String encodedFragment; String templateUrl; Builder() { encodedPathSegments.add(""); // The default path is '/' which needs a trailing space. } Builder scheme(String scheme) { if (scheme == null) throw new IllegalArgumentException("scheme == null"); this.scheme = scheme; return this; } Builder username(String username) { if (username == null) throw new IllegalArgumentException("username == null"); this.encodedUsername = canonicalize(username, USERNAME_ENCODE_SET, false, false); return this; } Builder encodedUsername(String encodedUsername) { if (encodedUsername == null) throw new IllegalArgumentException("encodedUsername == null"); this.encodedUsername = canonicalize(encodedUsername, USERNAME_ENCODE_SET, true, false); return this; } Builder password(String password) { if (password == null) throw new IllegalArgumentException("password == null"); this.encodedPassword = canonicalize(password, PASSWORD_ENCODE_SET, false, false); return this; } Builder encodedPassword(String encodedPassword) { if (encodedPassword == null) throw new IllegalArgumentException("encodedPassword == null"); this.encodedPassword = canonicalize(encodedPassword, PASSWORD_ENCODE_SET, true, false); return this; } /** * @param host either a regular hostname, International Domain Name, IPv4 address, or IPv6 * address. */ Builder host(String host) { if (host == null) throw new IllegalArgumentException("host == null"); String encoded = canonicalizeHost(host, 0, host.length()); if (encoded == null) throw new IllegalArgumentException("unexpected host: " + host); this.host = encoded; return this; } Builder port(int port) { if (port <= 0 || port > 65535) throw new IllegalArgumentException("unexpected port: " + port); this.port = port; return this; } int effectivePort() { return port != -1 ? port : defaultPort(scheme); } Builder addPathSegment(String pathSegment) { if (pathSegment == null) throw new IllegalArgumentException("pathSegment == null"); push(pathSegment, 0, pathSegment.length(), false, false); return this; } Builder addEncodedPathSegment(String encodedPathSegment) { if (encodedPathSegment == null) { throw new IllegalArgumentException("encodedPathSegment == null"); } push(encodedPathSegment, 0, encodedPathSegment.length(), false, true); return this; } Builder setPathSegment(int index, String pathSegment) { if (pathSegment == null) throw new IllegalArgumentException("pathSegment == null"); String canonicalPathSegment = canonicalize( pathSegment, 0, pathSegment.length(), PATH_SEGMENT_ENCODE_SET, false, false); if (isDot(canonicalPathSegment) || isDotDot(canonicalPathSegment)) { throw new IllegalArgumentException("unexpected path segment: " + pathSegment); } encodedPathSegments.set(index, canonicalPathSegment); return this; } Builder setEncodedPathSegment(int index, String encodedPathSegment) { if (encodedPathSegment == null) { throw new IllegalArgumentException("encodedPathSegment == null"); } String canonicalPathSegment = canonicalize(encodedPathSegment, 0, encodedPathSegment.length(), PATH_SEGMENT_ENCODE_SET, true, false); encodedPathSegments.set(index, canonicalPathSegment); if (isDot(canonicalPathSegment) || isDotDot(canonicalPathSegment)) { throw new IllegalArgumentException("unexpected path segment: " + encodedPathSegment); } return this; } Builder removePathSegment(int index) { encodedPathSegments.remove(index); if (encodedPathSegments.isEmpty()) { encodedPathSegments.add(""); // Always leave at least one '/'. } return this; } Builder encodedPath(String encodedPath) { if (encodedPath == null) throw new IllegalArgumentException("encodedPath == null"); if (!encodedPath.startsWith("/")) { throw new IllegalArgumentException("unexpected encodedPath: " + encodedPath); } resolvePath(encodedPath, 0, encodedPath.length()); return this; } Builder query(String query) { this.encodedQueryNamesAndValues = query != null ? queryStringToNamesAndValues(canonicalize(query, QUERY_ENCODE_SET, false, true)) : null; return this; } Builder encodedQuery(String encodedQuery) { this.encodedQueryNamesAndValues = encodedQuery != null ? queryStringToNamesAndValues(canonicalize(encodedQuery, QUERY_ENCODE_SET, true, true)) : null; return this; } /** Encodes the query parameter using UTF-8 and adds it to this URL's query string. */ Builder addQueryParameter(String name, String value) { if (name == null) throw new IllegalArgumentException("name == null"); if (encodedQueryNamesAndValues == null) encodedQueryNamesAndValues = new ArrayList<>(); encodedQueryNamesAndValues.add(canonicalize(name, QUERY_COMPONENT_ENCODE_SET, false, true)); encodedQueryNamesAndValues.add(value != null ? canonicalize(value, QUERY_COMPONENT_ENCODE_SET, false, true) : null); return this; } /** Adds the pre-encoded query parameter to this URL's query string. */ Builder addEncodedQueryParameter(String encodedName, String encodedValue) { if (encodedName == null) throw new IllegalArgumentException("encodedName == null"); if (encodedQueryNamesAndValues == null) encodedQueryNamesAndValues = new ArrayList<>(); encodedQueryNamesAndValues.add( canonicalize(encodedName, QUERY_COMPONENT_ENCODE_SET, true, true)); encodedQueryNamesAndValues.add(encodedValue != null ? canonicalize(encodedValue, QUERY_COMPONENT_ENCODE_SET, true, true) : null); return this; } Builder setQueryParameter(String name, String value) { removeAllQueryParameters(name); addQueryParameter(name, value); return this; } Builder setEncodedQueryParameter(String encodedName, String encodedValue) { removeAllEncodedQueryParameters(encodedName); addEncodedQueryParameter(encodedName, encodedValue); return this; } Builder removeAllQueryParameters(String name) { if (name == null) throw new IllegalArgumentException("name == null"); if (encodedQueryNamesAndValues == null) return this; String nameToRemove = canonicalize(name, QUERY_COMPONENT_ENCODE_SET, false, true); removeAllCanonicalQueryParameters(nameToRemove); return this; } Builder removeAllEncodedQueryParameters(String encodedName) { if (encodedName == null) throw new IllegalArgumentException("encodedName == null"); if (encodedQueryNamesAndValues == null) return this; removeAllCanonicalQueryParameters( canonicalize(encodedName, QUERY_COMPONENT_ENCODE_SET, true, true)); return this; } private void removeAllCanonicalQueryParameters(String canonicalName) { for (int i = encodedQueryNamesAndValues.size() - 2; i >= 0; i -= 2) { if (canonicalName.equals(encodedQueryNamesAndValues.get(i))) { encodedQueryNamesAndValues.remove(i + 1); encodedQueryNamesAndValues.remove(i); if (encodedQueryNamesAndValues.isEmpty()) { encodedQueryNamesAndValues = null; return; } } } } Builder fragment(String fragment) { if (fragment == null) throw new IllegalArgumentException("fragment == null"); this.encodedFragment = canonicalize(fragment, FRAGMENT_ENCODE_SET, false, false); return this; } Builder encodedFragment(String encodedFragment) { if (encodedFragment == null) throw new IllegalArgumentException("encodedFragment == null"); this.encodedFragment = canonicalize(encodedFragment, FRAGMENT_ENCODE_SET, true, false); return this; } DeepLinkUri build() { if (scheme == null) throw new IllegalStateException("scheme == null"); if (host == null) throw new IllegalStateException("host == null"); return new DeepLinkUri(this, templateUrl); } @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(scheme); result.append("://"); if (!encodedUsername.isEmpty() || !encodedPassword.isEmpty()) { result.append(encodedUsername); if (!encodedPassword.isEmpty()) { result.append(':'); result.append(encodedPassword); } result.append('@'); } if (host.indexOf(':') != -1) { // Host is an IPv6 address. result.append('['); result.append(host); result.append(']'); } else { result.append(host); } int effectivePort = effectivePort(); if (effectivePort != defaultPort(scheme)) { result.append(':'); result.append(effectivePort); } pathSegmentsToString(result, encodedPathSegments); if (encodedQueryNamesAndValues != null) { result.append('?'); namesAndValuesToQueryString(result, encodedQueryNamesAndValues); } if (encodedFragment != null) { result.append('#'); result.append(encodedFragment); } return result.toString(); } enum ParseResult { SUCCESS, MISSING_SCHEME, UNSUPPORTED_SCHEME, INVALID_PORT, INVALID_HOST, } ParseResult parse(DeepLinkUri base, String input, boolean allowPlaceholderInScheme) { int pos = skipLeadingAsciiWhitespace(input, 0, input.length()); int limit = skipTrailingAsciiWhitespace(input, pos, input.length()); if (allowPlaceholderInScheme) { templateUrl = input; } // Scheme. int schemeDelimiterOffset = schemeDelimiterOffset(input, pos, limit, allowPlaceholderInScheme); if (schemeDelimiterOffset != -1) { if (input.regionMatches(true, pos, "https:", 0, 6)) { this.scheme = "https"; pos += "https:".length(); } else if (input.regionMatches(true, pos, "http:", 0, 5)) { this.scheme = "http"; pos += "http:".length(); } else { this.scheme = input.substring(pos, schemeDelimiterOffset); pos += scheme.length() + 1; } } else if (base != null) { this.scheme = base.scheme; } else { return ParseResult.MISSING_SCHEME; // No scheme. } // Authority. boolean hasUsername = false; boolean hasPassword = false; int slashCount = slashCount(input, pos, limit); if (slashCount >= 2 || base == null || !base.scheme.equals(this.scheme)) { // Read an authority if either: // * The input starts with 2 or more slashes. These follow the scheme if it exists. // * The input scheme exists and is different from the base URL's scheme. // // The structure of an authority is: // username:password@host:port // // Username, password and port are optional. // [username[:password]@]host[:port] pos += slashCount; authority: while (true) { int componentDelimiterOffset = delimiterOffset(input, pos, limit, "@/\\?#"); int c = componentDelimiterOffset != limit ? input.charAt(componentDelimiterOffset) : -1; switch (c) { case '@': // User info precedes. if (!hasPassword) { int passwordColonOffset = delimiterOffset( input, pos, componentDelimiterOffset, ":"); String canonicalUsername = canonicalize( input, pos, passwordColonOffset, USERNAME_ENCODE_SET, true, false); this.encodedUsername = hasUsername ? this.encodedUsername + "%40" + canonicalUsername : canonicalUsername; if (passwordColonOffset != componentDelimiterOffset) { hasPassword = true; this.encodedPassword = canonicalize(input, passwordColonOffset + 1, componentDelimiterOffset, PASSWORD_ENCODE_SET, true, false); } hasUsername = true; } else { this.encodedPassword = this.encodedPassword + "%40" + canonicalize( input, pos, componentDelimiterOffset, PASSWORD_ENCODE_SET, true, false); } pos = componentDelimiterOffset + 1; break; case -1: case '/': case '\\': case '?': case '#': // Host info precedes. int portColonOffset = portColonOffset(input, pos, componentDelimiterOffset); if (portColonOffset + 1 < componentDelimiterOffset) { this.host = canonicalizeHost(input, pos, portColonOffset); this.port = parsePort(input, portColonOffset + 1, componentDelimiterOffset); if (this.port == -1) return ParseResult.INVALID_PORT; // Invalid port. } else { this.host = canonicalizeHost(input, pos, portColonOffset); this.port = defaultPort(this.scheme); } if (this.host == null) return ParseResult.INVALID_HOST; // Invalid host. pos = componentDelimiterOffset; break authority; default: break; } } } else { // This is a relative link. Copy over all authority components. Also maybe the path & query. this.encodedUsername = base.encodedUsername(); this.encodedPassword = base.encodedPassword(); this.host = base.host; this.port = base.port; this.encodedPathSegments.clear(); this.encodedPathSegments.addAll(base.encodedPathSegments()); if (pos == limit || input.charAt(pos) == '#') { encodedQuery(base.encodedQuery()); } } // Resolve the relative path. int pathDelimiterOffset = delimiterOffset(input, pos, limit, "?#"); resolvePath(input, pos, pathDelimiterOffset); pos = pathDelimiterOffset; // Query. if (pos < limit && input.charAt(pos) == '?') { int queryDelimiterOffset = delimiterOffset(input, pos, limit, "#"); this.encodedQueryNamesAndValues = queryStringToNamesAndValues(canonicalize( input, pos + 1, queryDelimiterOffset, QUERY_ENCODE_SET, true, true)); pos = queryDelimiterOffset; } // Fragment. if (pos < limit && input.charAt(pos) == '#') { this.encodedFragment = canonicalize( input, pos + 1, limit, FRAGMENT_ENCODE_SET, true, false); } return ParseResult.SUCCESS; } private void resolvePath(String input, int pos, int limit) { // Read a delimiter. if (pos == limit) { // Empty path: keep the base path as-is. return; } char c = input.charAt(pos); if (c == '/' || c == '\\') { // Absolute path: reset to the default "/". encodedPathSegments.clear(); encodedPathSegments.add(""); pos++; } else { // Relative path: clear everything after the last '/'. encodedPathSegments.set(encodedPathSegments.size() - 1, ""); } // Read path segments. for (int i = pos; i < limit;) { int pathSegmentDelimiterOffset = delimiterOffset(input, i, limit, "/\\"); boolean segmentHasTrailingSlash = pathSegmentDelimiterOffset < limit; push(input, i, pathSegmentDelimiterOffset, segmentHasTrailingSlash, true); i = pathSegmentDelimiterOffset; if (segmentHasTrailingSlash) i++; } } /** Adds a path segment. If the input is ".." or equivalent, this pops a path segment. */ private void push(String input, int pos, int limit, boolean addTrailingSlash, boolean alreadyEncoded) { String segment = canonicalize( input, pos, limit, PATH_SEGMENT_ENCODE_SET, alreadyEncoded, false); if (isDot(segment)) { return; // Skip '.' path segments. } if (isDotDot(segment)) { pop(); return; } if (encodedPathSegments.get(encodedPathSegments.size() - 1).isEmpty()) { encodedPathSegments.set(encodedPathSegments.size() - 1, segment); } else { encodedPathSegments.add(segment); } if (addTrailingSlash) { encodedPathSegments.add(""); } } private boolean isDot(String input) { return input.equals(".") || input.equalsIgnoreCase("%2e"); } private boolean isDotDot(String input) { return input.equals("..") || input.equalsIgnoreCase("%2e.") || input.equalsIgnoreCase(".%2e") || input.equalsIgnoreCase("%2e%2e"); } /** * Removes a path segment. When this method returns the last segment is always "", which means * the encoded path will have a trailing '/'. * * <p>Popping "/a/b/c/" yields "/a/b/". In this case the list of path segments goes from * ["a", "b", "c", ""] to ["a", "b", ""]. * * <p>Popping "/a/b/c" also yields "/a/b/". The list of path segments goes from ["a", "b", "c"] * to ["a", "b", ""]. */ private void pop() { String removed = encodedPathSegments.remove(encodedPathSegments.size() - 1); // Make sure the path ends with a '/' by either adding an empty string or clearing a segment. if (removed.isEmpty() && !encodedPathSegments.isEmpty()) { encodedPathSegments.set(encodedPathSegments.size() - 1, ""); } else { encodedPathSegments.add(""); } } /** * Increments {@code pos} until {@code input[pos]} is not ASCII whitespace. Stops at {@code * limit}. */ private int skipLeadingAsciiWhitespace(String input, int pos, int limit) { for (int i = pos; i < limit; i++) { switch (input.charAt(i)) { case '\t': case '\n': case '\f': case '\r': case ' ': continue; default: return i; } } return limit; } /** * Decrements {@code limit} until {@code input[limit - 1]} is not ASCII whitespace. Stops at * {@code pos}. */ private int skipTrailingAsciiWhitespace(String input, int pos, int limit) { for (int i = limit - 1; i >= pos; i--) { switch (input.charAt(i)) { case '\t': case '\n': case '\f': case '\r': case ' ': continue; default: return i + 1; } } return pos; } /** * Returns the index of the ':' in {@code input} that is after scheme characters. Returns -1 if * {@code input} does not have a scheme that starts at {@code pos}. */ private static int schemeDelimiterOffset(String input, int pos, int limit, boolean allowPlaceholderInScheme) { if (limit - pos < 2) return -1; char c0 = input.charAt(pos); if ((c0 < 'a' || c0 > 'z') && (c0 < 'A' || c0 > 'Z') && (allowPlaceholderInScheme && c0 != '{')) return -1; // Not a scheme start char. boolean inPlaceholder = c0 == '{' ? true : false; for (int i = pos + 1; i < limit; i++) { char c = input.charAt(i); if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '+' || c == '-' || c == '.' || (c == '{' && allowPlaceholderInScheme) || (c == '}' && allowPlaceholderInScheme) || inPlaceholder ) { if (c == '{') inPlaceholder = true; if (c == '}') inPlaceholder = false; continue; // Scheme character. Keep going. } else if (c == ':') { return i; // Scheme prefix! } else { return -1; // Non-scheme character before the first ':'. } } return -1; // No ':'; doesn't start with a scheme. } /** Returns the number of '/' and '\' slashes in {@code input}, starting at {@code pos}. */ private static int slashCount(String input, int pos, int limit) { int slashCount = 0; while (pos < limit) { char c = input.charAt(pos); if (c == '\\' || c == '/') { slashCount++; pos++; } else { break; } } return slashCount; } /** Finds the first ':' in {@code input}, skipping characters between square braces "[...]". */ private static int portColonOffset(String input, int pos, int limit) { for (int i = pos; i < limit; i++) { switch (input.charAt(i)) { case '[': while (++i < limit) { if (input.charAt(i) == ']') break; } break; case ':': return i; default: break; } } return limit; // No colon. } private static String canonicalizeHost(String input, int pos, int limit) { // Start by percent decoding the host. The WHATWG spec suggests doing this only after we've // checked for IPv6 square braces. But Chrome does it first, and that's more lenient. String percentDecoded = percentDecode(input, pos, limit); // If the input is encased in square braces "[...]", drop 'em. We have an IPv6 address. if (percentDecoded.startsWith("[") && percentDecoded.endsWith("]")) { InetAddress inetAddress = decodeIpv6(percentDecoded, 1, percentDecoded.length() - 1); if (inetAddress == null) return null; byte[] address = inetAddress.getAddress(); if (address.length == 16) return inet6AddressToAscii(address); throw new AssertionError(); } return domainToAscii(percentDecoded); } /** Decodes an IPv6 address like 1111:2222:3333:4444:5555:6666:7777:8888 or ::1. */ private static InetAddress decodeIpv6(String input, int pos, int limit) { byte[] address = new byte[16]; int b = 0; int compress = -1; int groupOffset = -1; for (int i = pos; i < limit;) { if (b == address.length) return null; // Too many groups. // Read a delimiter. if (i + 2 <= limit && input.regionMatches(i, "::", 0, 2)) { // Compression "::" delimiter, which is anywhere in the input, including its prefix. if (compress != -1) return null; // Multiple "::" delimiters. i += 2; b += 2; compress = b; if (i == limit) break; } else if (b != 0) { // Group separator ":" delimiter. if (input.regionMatches(i, ":", 0, 1)) { i++; } else if (input.regionMatches(i, ".", 0, 1)) { // If we see a '.', rewind to the beginning of the previous group and parse as IPv4. if (!decodeIpv4Suffix(input, groupOffset, limit, address, b - 2)) return null; b += 2; // We rewound two bytes and then added four. break; } else { return null; // Wrong delimiter. } } // Read a group, one to four hex digits. int value = 0; groupOffset = i; for (; i < limit; i++) { char c = input.charAt(i); int hexDigit = decodeHexDigit(c); if (hexDigit == -1) break; value = (value << 4) + hexDigit; } int groupLength = i - groupOffset; if (groupLength == 0 || groupLength > 4) return null; // Group is the wrong size. // We've successfully read a group. Assign its value to our byte array. address[b++] = (byte) ((value >>> 8) & 0xff); address[b++] = (byte) (value & 0xff); } // All done. If compression happened, we need to move bytes to the right place in the // address. Here's a sample: // // input: "1111:2222:3333::7777:8888" // before: { 11, 11, 22, 22, 33, 33, 00, 00, 77, 77, 88, 88, 00, 00, 00, 00 } // compress: 6 // b: 10 // after: { 11, 11, 22, 22, 33, 33, 00, 00, 00, 00, 00, 00, 77, 77, 88, 88 } // if (b != address.length) { if (compress == -1) return null; // Address didn't have compression or enough groups. System.arraycopy(address, compress, address, address.length - (b - compress), b - compress); Arrays.fill(address, compress, compress + (address.length - b), (byte) 0); } try { return InetAddress.getByAddress(address); } catch (UnknownHostException e) { throw new AssertionError(); } } /** Decodes an IPv4 address suffix of an IPv6 address, like 1111::5555:6666:192.168.0.1. */ private static boolean decodeIpv4Suffix( String input, int pos, int limit, byte[] address, int addressOffset) { int b = addressOffset; for (int i = pos; i < limit;) { if (b == address.length) return false; // Too many groups. // Read a delimiter. if (b != addressOffset) { if (input.charAt(i) != '.') return false; // Wrong delimiter. i++; } // Read 1 or more decimal digits for a value in 0..255. int value = 0; int groupOffset = i; for (; i < limit; i++) { char c = input.charAt(i); if (c < '0' || c > '9') break; if (value == 0 && groupOffset != i) return false; // Reject unnecessary leading '0's. value = (value * 10) + c - '0'; if (value > 255) return false; // Value out of range. } int groupLength = i - groupOffset; if (groupLength == 0) return false; // No digits. // We've successfully read a byte. address[b++] = (byte) value; } if (b != addressOffset + 4) return false; // Too few groups. We wanted exactly four. return true; // Success. } /** * Performs IDN ToASCII encoding and canonicalize the result to lowercase. e.g. This converts * {@code ☃.net} to {@code xn--n3h.net}, and {@code WwW.GoOgLe.cOm} to {@code www.google.com}. * {@code null} will be returned if the input cannot be ToASCII encoded or if the result * contains unsupported ASCII characters. */ private static String domainToAscii(String input) { try { // When this is a template URI it might get to long (> 256 chars) with all the placeholder // definitions to pass verification. // This will replace the placeholders with other shorter placeholders for URI validation. Set<String> placeholders = getPlaceHolders(input); String mappedInput = input; Map<String, String> placeholderMap = new HashMap(placeholders.size()); int i = 0; for (String placeholder : placeholders) { String replacedValue = "" + (i++); mappedInput = mappedInput.replace(placeholder, replacedValue); placeholderMap.put(placeholder, replacedValue); } String result = IDN.toASCII(mappedInput).toLowerCase(Locale.US); for (Map.Entry<String, String> entry : placeholderMap.entrySet()) { result = result.replace(entry.getValue(), entry.getKey()); } if (result.isEmpty()) return null; if (result == null) return null; // Confirm that the IDN ToASCII result doesn't contain any illegal characters. if (containsInvalidHostnameAsciiCodes(result)) { return null; } // TODO: implement all label limits. return result; } catch (IllegalArgumentException e) { return null; } } private static boolean containsInvalidHostnameAsciiCodes(String hostnameAscii) { for (int i = 0; i < hostnameAscii.length(); i++) { char c = hostnameAscii.charAt(i); // The WHATWG Host parsing rules accepts some character codes which are invalid by // definition for OkHttp's host header checks (and the WHATWG Host syntax definition). Here // we rule out characters that would cause problems in host headers. if (c <= '\u001f' || c >= '\u007f') { return true; } // Check for the characters mentioned in the WHATWG Host parsing spec: // U+0000, U+0009, U+000A, U+000D, U+0020, "#", "%", "/", ":", "?", "@", "[", "\", and "]" // (excluding the characters covered above). if (" #%/:?@[\\]".indexOf(c) != -1) { return true; } } return false; } private static String inet6AddressToAscii(byte[] address) { // Go through the address looking for the longest run of 0s. Each group is 2-bytes. int longestRunOffset = -1; int longestRunLength = 0; for (int i = 0; i < address.length; i += 2) { int currentRunOffset = i; while (i < 16 && address[i] == 0 && address[i + 1] == 0) { i += 2; } int currentRunLength = i - currentRunOffset; if (currentRunLength > longestRunLength) { longestRunOffset = currentRunOffset; longestRunLength = currentRunLength; } } // Emit each 2-byte group in hex, separated by ':'. The longest run of zeroes is "::". Buffer result = new Buffer(); for (int i = 0; i < address.length;) { if (i == longestRunOffset) { result.writeByte(':'); i += longestRunLength; if (i == 16) result.writeByte(':'); } else { if (i > 0) result.writeByte(':'); int group = (address[i] & 0xff) << 8 | address[i + 1] & 0xff; result.writeHexadecimalUnsignedLong(group); i += 2; } } return result.readUtf8(); } private static int parsePort(String input, int pos, int limit) { try { // Canonicalize the port string to skip '\n' etc. String portString = canonicalize(input, pos, limit, "", false, false); int i = Integer.parseInt(portString); if (i > 0 && i <= 65535) return i; return -1; } catch (NumberFormatException e) { return -1; // Invalid port. } } } /** * Returns the index of the first character in {@code input} that contains a character in {@code * delimiters}. Returns limit if there is no such character. */ private static int delimiterOffset(String input, int pos, int limit, String delimiters) { for (int i = pos; i < limit; i++) { if (delimiters.indexOf(input.charAt(i)) != -1) return i; } return limit; } static String percentDecode(String encoded) { return percentDecode(encoded, 0, encoded.length()); } private List<String> percentDecode(List<String> list) { List<String> result = new ArrayList<>(list.size()); for (String s : list) { result.add(s != null ? percentDecode(s) : null); } return Collections.unmodifiableList(result); } static String percentDecode(String encoded, int pos, int limit) { for (int i = pos; i < limit; i++) { char c = encoded.charAt(i); if (c == '%') { // Slow path: the character at i requires decoding! Buffer out = new Buffer(); out.writeUtf8(encoded, pos, i); percentDecode(out, encoded, i, limit); return out.readUtf8(); } } // Fast path: no characters in [pos..limit) required decoding. return encoded.substring(pos, limit); } static void percentDecode(Buffer out, String encoded, int pos, int limit) { int codePoint; for (int i = pos; i < limit; i += Character.charCount(codePoint)) { codePoint = encoded.codePointAt(i); if (codePoint == '%' && i + 2 < limit) { int d1 = decodeHexDigit(encoded.charAt(i + 1)); int d2 = decodeHexDigit(encoded.charAt(i + 2)); if (d1 != -1 && d2 != -1) { out.writeByte((d1 << 4) + d2); i += 2; continue; } } out.writeUtf8CodePoint(codePoint); } } static int decodeHexDigit(char c) { if (c >= '0' && c <= '9') return c - '0'; if (c >= 'a' && c <= 'f') return c - 'a' + 10; if (c >= 'A' && c <= 'F') return c - 'A' + 10; return -1; } /** * Returns a substring of {@code input} on the range {@code [pos..limit)} with the following * transformations: * <ul> * <li>Tabs, newlines, form feeds and carriage returns are skipped. * <li>In queries, ' ' is encoded to '+' and '+' is encoded to "%2B". * <li>Characters in {@code encodeSet} are percent-encoded. * <li>Control characters and non-ASCII characters are percent-encoded. * <li>All other characters are copied without transformation. * </ul> * * @param alreadyEncoded true to leave '%' as-is; false to convert it to '%25'. * @param query true if to encode ' ' as '+', and '+' as "%2B". */ static String canonicalize(String input, int pos, int limit, String encodeSet, boolean alreadyEncoded, boolean query) { int codePoint; for (int i = pos; i < limit; i += Character.charCount(codePoint)) { codePoint = input.codePointAt(i); if (codePoint < 0x20 || codePoint >= 0x7f || encodeSet.indexOf(codePoint) != -1 || (codePoint == '%' && !alreadyEncoded) || (query && codePoint == '+')) { // Slow path: the character at i requires encoding! Buffer out = new Buffer(); out.writeUtf8(input, pos, i); canonicalize(out, input, i, limit, encodeSet, alreadyEncoded, query); return out.readUtf8(); } } // Fast path: no characters in [pos..limit) required encoding. return input.substring(pos, limit); } static void canonicalize(Buffer out, String input, int pos, int limit, String encodeSet, boolean alreadyEncoded, boolean query) { Buffer utf8Buffer = null; // Lazily allocated. int codePoint; for (int i = pos; i < limit; i += Character.charCount(codePoint)) { codePoint = input.codePointAt(i); if (alreadyEncoded && (codePoint == '\t' || codePoint == '\n' || codePoint == '\f' || codePoint == '\r')) { // Skip this character. } else if (query && codePoint == '+') { // HTML permits space to be encoded as '+'. We use '%20' to avoid special cases. out.writeUtf8(alreadyEncoded ? "%20" : "%2B"); } else if (codePoint < 0x20 || codePoint >= 0x7f || encodeSet.indexOf(codePoint) != -1 || (codePoint == '%' && !alreadyEncoded)) { // Percent encode this character. if (utf8Buffer == null) { utf8Buffer = new Buffer(); } utf8Buffer.writeUtf8CodePoint(codePoint); try { while (!utf8Buffer.exhausted()) { int b = utf8Buffer.readByte() & 0xff; out.writeByte('%'); out.writeByte(HEX_DIGITS[(b >> 4) & 0xf]); out.writeByte(HEX_DIGITS[b & 0xf]); } } catch (EOFException e) { // Cannot happen as we never read over the end. System.err.println("Unable to canonicalize deeplink url!"); } } else { // This character doesn't need encoding. Just copy it over. out.writeUtf8CodePoint(codePoint); } } } static String canonicalize( String input, String encodeSet, boolean alreadyEncoded, boolean query) { return canonicalize(input, 0, input.length(), encodeSet, alreadyEncoded, query); } }
5,946
0
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb/deeplinkdispatch
Create_ds/DeepLinkDispatch/deeplinkdispatch-base/src/main/java/com/airbnb/deeplinkdispatch/base/MatchIndex.java
package com.airbnb.deeplinkdispatch.base; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.airbnb.deeplinkdispatch.DeepLinkUri; import com.airbnb.deeplinkdispatch.DeepLinkMatchResult; import com.airbnb.deeplinkdispatch.MatchType; import com.airbnb.deeplinkdispatch.NodeMetadata; import com.airbnb.deeplinkdispatch.DeepLinkEntry; import com.airbnb.deeplinkdispatch.UrlElement; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * This is a wrapper class around the byte array match index. * <p>Byte array format is:</p> * <hr/> * <table border="1"> * <tr> * <td>Node's metadata flags</td> * <td>value length</td> * <td>match length</td> * <td>children length</td> * <td>value data</td> * <td>match data</td> * <td>children data</td> * </tr> * <tr> * <td>0 (1 byte)</td> * <td>1 (2 bytes)</td> * <td>2 (2 bytes)</td> * <td>4 (4 bytes)</td> * <td>8 (value length bytes)</td> * <td>8+value length (match length bytes)</td> * <td>8+value length+match length (children length bytes)</td> * </tr> * <tr> * <td>{@linkplain com.airbnb.deeplinkdispatch.NodeMetadata} e.g. scheme, authority, path segment, * transformation</td> * <td>length of the node's (string) value.</td> * <td>length of the node's match length (can be 0 if this is no leaf note that has * encodes a match.</td> * <td>length of the node's children sub array.</td> * <td>actual value sub array</td> * <td>match data sub array (if match length is 0 this does not exist)</td> * <td>children data sub array</td> * </tr> * </table> * <hr/> * <p> * This is implemented in Java for speed reasons. Converting this class to Kotlin made the * whole lookup operation multiple times slower. * This is most likely not a Kotlin issue but some syntactic sugar used must have crated some * overhead. * As this is very "bare metal" anyway it was "safer" to write this in Java to avoid any * instructions to be added that are not necessary.</p> */ public class MatchIndex { /** * Encoding used for serialization */ @NonNull public static final String MATCH_INDEX_ENCODING = "ISO_8859_1"; /** * Length of header elements in bytes */ public static final int HEADER_NODE_METADATA_LENGTH = 1; public static final int HEADER_VALUE_LENGTH = 2; public static final int HEADER_MATCH_LENGTH = 2; public static final int HEADER_CHILDREN_LENGTH = 4; public static final int MATCH_DATA_URL_TEMPLATE_LENGTH = 2; public static final int MATCH_DATA_TYPE_LENGTH = 1; public static final int MATCH_DATA_CLASS_LENGTH = 2; public static final int MATCH_DATA_METHOD_LENGTH = 1; public static final int HEADER_LENGTH = HEADER_NODE_METADATA_LENGTH + HEADER_VALUE_LENGTH + HEADER_MATCH_LENGTH + HEADER_CHILDREN_LENGTH; @NonNull public static final String ROOT_VALUE = "r"; // Used to separate param and param value in compare return value (record separator) @NonNull public static final String MATCH_PARAM_DIVIDER_CHAR = String.valueOf((char) 0x1e); @NonNull public static final char[] VARIABLE_DELIMITER = {'{', '}'}; @NonNull public static final char[] ALLOWED_VALUES_DELIMITER = {'(', ')'}; @NonNull public static final char ALLOWED_VALUES_SEPARATOR = '|'; private static final String ALLOWED_VALUES_SEPARATOR_REGEX_STRING = "\\" + ALLOWED_VALUES_SEPARATOR; @NonNull public final byte[] byteArray; public MatchIndex(@NonNull byte[] byteArray) { this.byteArray = byteArray; } /** * Match a given {@link com.airbnb.deeplinkdispatch.DeepLinkUri} (given as a List of * {@link UrlElement} against this searchh index. * Will return an instance of {@link DeepLinkEntry} if a match was found or null if there wasn't. * * * @param deeplinkUri The uri that should be matched * @param elements The {@link UrlElement} list of * the {@link DeepLinkUri} to match against. Must be * in correct order (scheme -> host -> path elements) * @param placeholders Placeholders (that are encoded at {name} in the Url inside the index. Used * to collect the set of placeholders and their values as * the {@link DeepLinkUri} is recursively * processed. * @param elementIndex The index of the element currently processed in the elements list above. * @param elementStartPosition The index of the start position of the current element int he * byte array search index. * @param parentBoundaryPos The last element that is still part of the parent element. While * looking at children of a current element that is the last element of * the last child. * @param pathSegmentReplacements A map of configurable path segment replacements and their * values. * @return An instance of {@link DeepLinkEntry} if a match was found null if it wasn't. */ public DeepLinkMatchResult matchUri(@NonNull DeepLinkUri deeplinkUri, @NonNull List<UrlElement> elements, @Nullable Map<String, String> placeholders, int elementIndex, int elementStartPosition, int parentBoundaryPos, Map<byte[], byte[]> pathSegmentReplacements) { DeepLinkMatchResult match = null; int currentElementStartPosition = elementStartPosition; do { UrlElement urlElement = elements.get(elementIndex); CompareResult compareResult = compareValue(currentElementStartPosition, urlElement.getTypeFlag(), urlElement.getValue(), pathSegmentReplacements); if (compareResult != null) { Map<String, String> placeholdersOutput = placeholders; // If the compareResult is not empty we found a match with a placeholder. We need to save // that placeholder -- and the value it was placeholding for -- in a map and possibly // hand it down to the next level of recursion. if (!compareResult.getPlaceholderValue().isEmpty()) { // We need to have a new HashMap for every partial match to make sure that the // placeholders found in other partial matches do not overlap with the actual final match. placeholdersOutput = new HashMap<>(placeholders != null ? placeholders : Collections.emptyMap()); String[] compareParams = compareResult.getPlaceholderValue().split(MATCH_PARAM_DIVIDER_CHAR, -1); // Add the found placeholder set to the map. placeholdersOutput.put(compareParams[0], compareParams[1]); } // Only go and try to match the next element if we have one, or if we found an empty // configurable path segment then we actually will go to the child element in the index // but use the same element again. if (elementIndex < elements.size() - 1 || compareResult.isEmptyConfigurablePathSegmentMatch()) { // If value matched we need to explore this elements children next. int childrenPos = getChildrenPos(currentElementStartPosition); if (childrenPos != -1) { // Recursively call matchUri again for the next element and with the child element // of the current element in the index. // If this element match was based on an empty configurable path segment we want to // "skip" the match and thus use the same element or the Uri for the next round. match = matchUri(deeplinkUri, elements, placeholdersOutput, compareResult.isEmptyConfigurablePathSegmentMatch() ? elementIndex : elementIndex + 1, childrenPos, getElementBoundaryPos(currentElementStartPosition), pathSegmentReplacements); } } else { int matchLength = getMatchLength(currentElementStartPosition); if (matchLength > 0) { match = getMatchResultFromIndex( matchLength, getMatchDataPos(currentElementStartPosition), deeplinkUri, placeholdersOutput); } } } if (match != null) { return match; } currentElementStartPosition = getNextElementStartPosition(currentElementStartPosition, parentBoundaryPos); } while (currentElementStartPosition != -1); return null; } @NonNull public List<DeepLinkEntry> getAllEntries(int elementStartPos, int parentBoundaryPos) { List<DeepLinkEntry> resultList = new ArrayList(); int currentElementStartPosition = elementStartPos; do { int matchLength = getMatchLength(currentElementStartPosition); if (matchLength > 0) { resultList.add(getDeepLinkEntryFromIndex(byteArray, matchLength, getMatchDataPos(currentElementStartPosition))); } if (getChildrenPos(currentElementStartPosition) != -1) { resultList.addAll(getAllEntries(getChildrenPos(currentElementStartPosition), getElementBoundaryPos(currentElementStartPosition))); } currentElementStartPosition = getNextElementStartPosition(currentElementStartPosition, parentBoundaryPos); } while (currentElementStartPosition != -1); return resultList; } @Nullable public DeepLinkMatchResult getMatchResultFromIndex(int matchLength, int matchStartPosition, @NonNull DeepLinkUri deeplinkUri, @NonNull Map<String, String> placeholdersOutput) { DeepLinkEntry deeplinkEntry = getDeepLinkEntryFromIndex(byteArray, matchLength, matchStartPosition); if (deeplinkEntry == null) return null; return new DeepLinkMatchResult( deeplinkEntry, Collections.singletonMap(deeplinkUri, placeholdersOutput)); } @Nullable private static DeepLinkEntry getDeepLinkEntryFromIndex(@NonNull byte[] byteArray, int matchLength, int matchStartPosition) { if (matchLength == 0) { return null; } int position = matchStartPosition; MatchType matchType = MatchType.fromInt(readOneByteAsInt(byteArray, position)); position += MATCH_DATA_TYPE_LENGTH; int urlTemplateLength = readTwoBytesAsInt(byteArray, position); position += MATCH_DATA_URL_TEMPLATE_LENGTH; String urlTemplate = getStringFromByteArray(byteArray, position, urlTemplateLength); position += urlTemplateLength; int classLength = readTwoBytesAsInt(byteArray, position); position += MATCH_DATA_CLASS_LENGTH; String className = getStringFromByteArray(byteArray, position, classLength); position += classLength; int methodLength = readOneByteAsInt(byteArray, position); String methodName = null; if (methodLength > 0) { position += MATCH_DATA_METHOD_LENGTH; methodName = getStringFromByteArray(byteArray, position, methodLength); } switch (matchType) { case Activity: return new DeepLinkEntry.ActivityDeeplinkEntry(urlTemplate, className); case Method: return new DeepLinkEntry.MethodDeeplinkEntry(urlTemplate, className, methodName); case Handler: return new DeepLinkEntry.HandlerDeepLinkEntry(urlTemplate, className); default: throw new IllegalStateException("Unhandled match type: " + matchType); } } /** * @param elementStartPos The start position of the element to compare * @param inboundUriComponentType A flag for the URI component type of the inboundValue to * compare (like scheme, host, or path segment) * @param inboundValue The byte array of the inbound URI * @return An instance of {@link CompareResult} if the type, length and inboundValue of the * element staring at elementStartPos is the same as the inboundValue given in in the parameter, * null otherwise. * More details of the match are contained in {@link CompareResult}. */ @Nullable private CompareResult compareValue(int elementStartPos, byte inboundUriComponentType, @NonNull byte[] inboundValue, Map<byte[], byte[]> pathSegmentReplacements) { // Placeholder always matches int valueStartPos = elementStartPos + HEADER_LENGTH; NodeMetadata nodeMetadata = new NodeMetadata(byteArray[elementStartPos]); //Opportunistically skip doing more operations on this node if we can infer it will not match //based on URIComponentType if (nodeMetadata.isComponentTypeMismatch(inboundUriComponentType)) return null; int valueLength = getValueLength(elementStartPos); boolean isValueLengthMismatch = valueLength != inboundValue.length; if (isValueLengthMismatch && nodeMetadata.isValueLiteralValue) { //Opportunistically skip this node if the comparator's lengths mismatch. return null; } if (nodeMetadata.isComponentParam) { return compareComponentParam(valueStartPos, valueLength, inboundValue, VARIABLE_DELIMITER); } else if (nodeMetadata.isConfigurablePathSegment) { return compareConfigurablePathSegment(inboundValue, pathSegmentReplacements, valueStartPos, valueLength); } else { return arrayCompare(byteArray, valueStartPos, valueLength, inboundValue); } } private CompareResult arrayCompare(byte[] byteArray, int startPos, int length, byte[] compareValue) { if (length != compareValue.length) { return null; } for (int i = 0; i < length; i++) { if (compareValue[i] != byteArray[startPos + i]) return null; } return new CompareResult("", false); } @Nullable private CompareResult compareConfigurablePathSegment(@NonNull byte[] inboundValue, Map<byte[], byte[]> pathSegmentReplacements, int valueStartPos, int valueLength) { byte[] replacementValue = null; for (Map.Entry<byte[], byte[]> pathSegmentEntry : pathSegmentReplacements.entrySet()) { if (arrayCompare(byteArray, valueStartPos, valueLength, pathSegmentEntry.getKey()) != null) { replacementValue = pathSegmentEntry.getValue(); } } if (replacementValue == null) { return null; } if (replacementValue.length == 0) { return new CompareResult("", true); } if (arrayCompare(inboundValue, 0, inboundValue.length, replacementValue) != null) { return new CompareResult("", false); } else { return null; } } @Nullable private CompareResult compareComponentParam( int valueStartPos, int valueLength, @NonNull byte[] valueToMatch, char[] delimiter ) { int valueToMatchLength = valueToMatch.length; if (( //Per com.airbnb.deeplinkdispatch.DeepLinkEntryTest.testEmptyParametersNameDontMatch //We should not return a match if the param (aka placeholder) is empty. byteArray[valueStartPos] == delimiter[0] && byteArray[valueStartPos + 1] == delimiter[1] ) || ( //Per com.airbnb.deeplinkdispatch.DeepLinkEntryTest.testEmptyPathPresentParams //We expect an empty path to not be a match valueToMatchLength == 0 )) { return null; } // i index over valueToMatch array forward // j index over search byte arrays valueToMatch element forward // k index over valueToMatch array backward for (int i = 0; i < valueToMatchLength; i++) { // Edge case. All chars before placeholder match. And there are no more chars left in // input string. But there are still chars left in value. In that case we need to look // at the rest of the value as there might chars after the placeholder (e.g. pre{ph}post) //or a placeholder that matches the empty string. e.g. boolean fullyMatchedButThereAreMoreCharsInValue = byteArray[valueStartPos + i] == valueToMatch[i] && i == valueToMatchLength - 1 && valueLength > valueToMatchLength; if (byteArray[valueStartPos + i] == delimiter[0] || fullyMatchedButThereAreMoreCharsInValue) { // Until here every char in front for the placeholder matched. // Now let's see if all chars within the placeholder also match. for (int j = valueLength - 1, k = valueToMatchLength - 1; j >= 0; j--, k--) { if (byteArray[valueStartPos + j] == delimiter[1]) { // In chase we already matched all chars from valueToMatch but there are are more chars // in the value inside the value array, we technically are in the next loop but need // to be careful as using this to access valueToMatch[] will produce AIOOB! if (fullyMatchedButThereAreMoreCharsInValue) { i++; } // Text within the placeholder fully matches. Now we just need to get the placeholder // string and can return. byte[] placeholderValue = new byte[k - i + 1]; // Size is without braces byte[] placeholderName = new byte[(valueStartPos + j) - (valueStartPos + i) - 1]; System.arraycopy(valueToMatch, i, placeholderValue, 0, placeholderValue.length); System.arraycopy(byteArray, valueStartPos + i + 1, placeholderName, 0, placeholderName.length); // If the placeholder name has an allowed values field check if the value found is in // there, otherwise this is not a match. int beginAllowedValues = verifyAllowedValues(placeholderName, placeholderValue); if (beginAllowedValues > -1) { byte[] placeholderValueWithoutAllowedValues; if (beginAllowedValues == Integer.MAX_VALUE) { placeholderValueWithoutAllowedValues = placeholderName; } else { placeholderValueWithoutAllowedValues = Arrays.copyOfRange(placeholderName, 0, beginAllowedValues); } return new CompareResult( new String(placeholderValueWithoutAllowedValues) + MATCH_PARAM_DIVIDER_CHAR + new String(placeholderValue), false); } else return null; } // We do the comparison from the back. If the value in the index (before the placeholder // starts) is longer than valueToMatch we need to abort. // e.g. template value: "{something}longer" and valueToMatch: "onger". As we compare // from back all the chars match but the template value is longer so as soon as we reach // the end of valueToMatch before we reach the placeholder end char we need to abort. if (k < 0 || byteArray[valueStartPos + j] != valueToMatch[k]) { return null; } } } if (byteArray[valueStartPos + i] != valueToMatch[i]) { return null; // Does not match } } return new CompareResult("", false); // Matches but is no placeholder } /** * Check if this placholder has an allowed values field and if so check if the matched value * is allowed. * * @param placeholderName The placeholder name (as it appears between the * VARIABLE_DELIMITER) * @param matchedPlaceholderValue The matched placeholder value. * @return MAX_INT if there is no valid allowed values field in the placeholderName or position * of allowed placeholder value if the matched value is allowed, -1 otherwise. */ private int verifyAllowedValues(byte[] placeholderName, byte[] matchedPlaceholderValue) { int beginAllowedValues = charPos(placeholderName, ALLOWED_VALUES_DELIMITER[0]); // No allowed values so this check is true if (beginAllowedValues == -1) return Integer.MAX_VALUE; int endAllowedValues = charPos(placeholderName, ALLOWED_VALUES_DELIMITER[1]); if (beginAllowedValues > endAllowedValues) return Integer.MAX_VALUE; String[] allowedValues = new String( Arrays.copyOfRange(placeholderName, beginAllowedValues + 1, endAllowedValues)).split(ALLOWED_VALUES_SEPARATOR_REGEX_STRING); if (Arrays.binarySearch(allowedValues, new String(matchedPlaceholderValue)) > -1) { return beginAllowedValues; } return -1; } private int charPos(byte[] byteArray, char value) { if (byteArray == null) return -1; for (int i = 0; i < byteArray.length; i++) { if (byteArray[i] == value) { return i; } } return -1; } /** * Get the next entries position, or -1 if there are no further entries. * * @param elementStartPos The start position of the current element. * @param parentBoundaryPos The parent elements boundry (i.e. the first elementStartPos that is * not part of the parent element anhymore) * @return The next entries position, or -1 if there are no further entries. */ private int getNextElementStartPosition(int elementStartPos, int parentBoundaryPos) { int nextElementPos = getElementBoundaryPos(elementStartPos); if (nextElementPos == parentBoundaryPos) { // This was the last element return -1; } else { return nextElementPos; } } /** * The elements boundary is the first elementStartPos that is not part of the parent element * anymore. * * @param elementStartPos The start position of the current element. * @return The first elementStartPos that is not part of the parent element anymore. */ private int getElementBoundaryPos(int elementStartPos) { return getMatchDataPos(elementStartPos) + getMatchLength(elementStartPos) + getChildrenLength(elementStartPos); } /** * Get the position of the children element of the element starting at elementStartPos. * * @param elementStartPos The start position of the element to get the children for * @return children pos or -1 if there are no children. */ private int getChildrenPos(int elementStartPos) { if (getChildrenLength(elementStartPos) == 0) { return -1; } else { return getMatchDataPos(elementStartPos) + getMatchLength(elementStartPos); } } /** * The position of the match data section of the element starting at elementStartPos. * <p> * Note: The can be 0 length in which case getMatchDataPosition() and getChildrenPos() will * return the same value. * * @param elementStartPos Starting position of element to process. * @return The position of the match data sub array for the given elementStartPos. */ private int getMatchDataPos(int elementStartPos) { return elementStartPos + HEADER_LENGTH + getValueLength(elementStartPos); } /** * The length of the value element of the element starting at elementStartPos. * * @param elementStartPos Starting position of element to process * @return The length of the value section of this element. */ private int getValueLength(int elementStartPos) { return readTwoBytesAsInt( byteArray, elementStartPos + HEADER_NODE_METADATA_LENGTH ); } /** * The length of the match section of the element starting at elementStartPos. * * @param elementStartPos Starting position of element to process * @return The length of the match section of this element. */ private int getMatchLength(int elementStartPos) { return readTwoBytesAsInt( byteArray, elementStartPos + HEADER_NODE_METADATA_LENGTH + HEADER_VALUE_LENGTH ); } /** * The length of the children section of the element starting at elementStartPos. * * @param elementStartPos Starting position of element to process * @return The length of the children section of this element. */ private int getChildrenLength(int elementStartPos) { return readFourBytesAsInt( byteArray, elementStartPos + HEADER_NODE_METADATA_LENGTH + HEADER_VALUE_LENGTH + HEADER_MATCH_LENGTH ); } public int length() { return byteArray.length; } private static int readOneByteAsInt(byte[] byteArray, int pos) { return byteArray[pos] & 0xFF; } private static int readTwoBytesAsInt(byte[] byteArray, int pos) { return (readOneByteAsInt(byteArray, pos)) << 8 | (readOneByteAsInt(byteArray, pos + 1)); } private static int readFourBytesAsInt(byte[] byteArray, int pos) { return (readOneByteAsInt(byteArray, pos)) << 24 | (readOneByteAsInt(byteArray, pos + 1)) << 16 | (readOneByteAsInt(byteArray, pos + 2)) << 8 | (readOneByteAsInt(byteArray, pos + 3)); } @Nullable private static String getStringFromByteArray(byte[] byteArray, int start, int length) { byte[] stringByteAray = new byte[length]; System.arraycopy(byteArray, start, stringByteAray, 0, length); try { return new String(stringByteAray, "utf-8"); } catch (UnsupportedEncodingException e) { // Cannot be reached. } return null; } /** * Get filename for match index. * * @param moduleName The module name the match index is for. * @return The filename used to store the match index. */ public static @NonNull String getMatchIdxFileName(@NonNull String moduleName) { return "dld_match_" + moduleName.toLowerCase() + ".idx"; } }
5,947
0
Create_ds/DeepLinkDispatch/sample-benchmarkable-library/src/main/java/com/airbnb/deeplinkdispatch/sample
Create_ds/DeepLinkDispatch/sample-benchmarkable-library/src/main/java/com/airbnb/deeplinkdispatch/sample/benchmarkable/ScaleTestActivity.java
/* * Copyright (C) 2015 Airbnb, Inc. * * Licensed 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.airbnb.deeplinkdispatch.sample.benchmarkable; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import com.airbnb.deeplinkdispatch.DeepLink; /** * Activity with 2k deeplinks to test DLD performance at scale */ public class ScaleTestActivity extends AppCompatActivity { private static final String ACTION_DEEP_LINK_METHOD = "deep_link_method"; private static final String ACTION_DEEP_LINK_COMPLEX = "deep_link_complex"; private static final String TAG = ScaleTestActivity.class.getSimpleName(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.scale_activity_main); Intent intent = getIntent(); if (intent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false)) { String toastMessage; Bundle parameters = intent.getExtras(); Log.d(TAG, "Deeplink params: " + parameters); if (ACTION_DEEP_LINK_METHOD.equals(intent.getAction())) { toastMessage = "method with param1:" + parameters.getString("param1"); } else if (ACTION_DEEP_LINK_COMPLEX.equals(intent.getAction())) { toastMessage = parameters.getString("arbitraryNumber"); } else if (parameters.containsKey("arg")) { toastMessage = "class and found arg:" + parameters.getString("arg"); } else { toastMessage = "class"; } // You can pass a query parameter with the URI, and it's also in parameters, like // dld://classDeepLink?qp=123 if (parameters.containsKey("qp")) { toastMessage += " with query parameter " + parameters.getString("qp"); } Uri referrer = ActivityCompat.getReferrer(this); if (referrer != null) { toastMessage += " and referrer: " + referrer.toString(); } showToast(toastMessage); } } /** * Handles deep link with one param, doc does not contain "param" * @return A intent to start {@link ScaleTestActivity} */ @DeepLink("dld://methodDeepLink1/{param1}") public static Intent intentForDeepLinkMethod1(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink2/{param1}") public static Intent intentForDeepLinkMethod2(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink3/{param1}") public static Intent intentForDeepLinkMethod3(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink4/{param1}") public static Intent intentForDeepLinkMethod4(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink5/{param1}") public static Intent intentForDeepLinkMethod5(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink6/{param1}") public static Intent intentForDeepLinkMethod6(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink7/{param1}") public static Intent intentForDeepLinkMethod7(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink8/{param1}") public static Intent intentForDeepLinkMethod8(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink9/{param1}") public static Intent intentForDeepLinkMethod9(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink10/{param1}") public static Intent intentForDeepLinkMethod10(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink11/{param1}") public static Intent intentForDeepLinkMethod11(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink12/{param1}") public static Intent intentForDeepLinkMethod12(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink13/{param1}") public static Intent intentForDeepLinkMethod13(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink14/{param1}") public static Intent intentForDeepLinkMethod14(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink15/{param1}") public static Intent intentForDeepLinkMethod15(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink16/{param1}") public static Intent intentForDeepLinkMethod16(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink17/{param1}") public static Intent intentForDeepLinkMethod17(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink18/{param1}") public static Intent intentForDeepLinkMethod18(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink19/{param1}") public static Intent intentForDeepLinkMethod19(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink20/{param1}") public static Intent intentForDeepLinkMethod20(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink21/{param1}") public static Intent intentForDeepLinkMethod21(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink22/{param1}") public static Intent intentForDeepLinkMethod22(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink23/{param1}") public static Intent intentForDeepLinkMethod23(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink24/{param1}") public static Intent intentForDeepLinkMethod24(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink25/{param1}") public static Intent intentForDeepLinkMethod25(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink26/{param1}") public static Intent intentForDeepLinkMethod26(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink27/{param1}") public static Intent intentForDeepLinkMethod27(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink28/{param1}") public static Intent intentForDeepLinkMethod28(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink29/{param1}") public static Intent intentForDeepLinkMethod29(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink30/{param1}") public static Intent intentForDeepLinkMethod30(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink31/{param1}") public static Intent intentForDeepLinkMethod31(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink32/{param1}") public static Intent intentForDeepLinkMethod32(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink33/{param1}") public static Intent intentForDeepLinkMethod33(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink34/{param1}") public static Intent intentForDeepLinkMethod34(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink35/{param1}") public static Intent intentForDeepLinkMethod35(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink36/{param1}") public static Intent intentForDeepLinkMethod36(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink37/{param1}") public static Intent intentForDeepLinkMethod37(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink38/{param1}") public static Intent intentForDeepLinkMethod38(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink39/{param1}") public static Intent intentForDeepLinkMethod39(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink40/{param1}") public static Intent intentForDeepLinkMethod40(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink41/{param1}") public static Intent intentForDeepLinkMethod41(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink42/{param1}") public static Intent intentForDeepLinkMethod42(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink43/{param1}") public static Intent intentForDeepLinkMethod43(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink44/{param1}") public static Intent intentForDeepLinkMethod44(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink45/{param1}") public static Intent intentForDeepLinkMethod45(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink46/{param1}") public static Intent intentForDeepLinkMethod46(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink47/{param1}") public static Intent intentForDeepLinkMethod47(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink48/{param1}") public static Intent intentForDeepLinkMethod48(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink49/{param1}") public static Intent intentForDeepLinkMethod49(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink50/{param1}") public static Intent intentForDeepLinkMethod50(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink51/{param1}") public static Intent intentForDeepLinkMethod51(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink52/{param1}") public static Intent intentForDeepLinkMethod52(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink53/{param1}") public static Intent intentForDeepLinkMethod53(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink54/{param1}") public static Intent intentForDeepLinkMethod54(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink55/{param1}") public static Intent intentForDeepLinkMethod55(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink56/{param1}") public static Intent intentForDeepLinkMethod56(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink57/{param1}") public static Intent intentForDeepLinkMethod57(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink58/{param1}") public static Intent intentForDeepLinkMethod58(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink59/{param1}") public static Intent intentForDeepLinkMethod59(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink60/{param1}") public static Intent intentForDeepLinkMethod60(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink61/{param1}") public static Intent intentForDeepLinkMethod61(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink62/{param1}") public static Intent intentForDeepLinkMethod62(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink63/{param1}") public static Intent intentForDeepLinkMethod63(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink64/{param1}") public static Intent intentForDeepLinkMethod64(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink65/{param1}") public static Intent intentForDeepLinkMethod65(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink66/{param1}") public static Intent intentForDeepLinkMethod66(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink67/{param1}") public static Intent intentForDeepLinkMethod67(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink68/{param1}") public static Intent intentForDeepLinkMethod68(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink69/{param1}") public static Intent intentForDeepLinkMethod69(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink70/{param1}") public static Intent intentForDeepLinkMethod70(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink71/{param1}") public static Intent intentForDeepLinkMethod71(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink72/{param1}") public static Intent intentForDeepLinkMethod72(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink73/{param1}") public static Intent intentForDeepLinkMethod73(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink74/{param1}") public static Intent intentForDeepLinkMethod74(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink75/{param1}") public static Intent intentForDeepLinkMethod75(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink76/{param1}") public static Intent intentForDeepLinkMethod76(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink77/{param1}") public static Intent intentForDeepLinkMethod77(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink78/{param1}") public static Intent intentForDeepLinkMethod78(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink79/{param1}") public static Intent intentForDeepLinkMethod79(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink80/{param1}") public static Intent intentForDeepLinkMethod80(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink81/{param1}") public static Intent intentForDeepLinkMethod81(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink82/{param1}") public static Intent intentForDeepLinkMethod82(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink83/{param1}") public static Intent intentForDeepLinkMethod83(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink84/{param1}") public static Intent intentForDeepLinkMethod84(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink85/{param1}") public static Intent intentForDeepLinkMethod85(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink86/{param1}") public static Intent intentForDeepLinkMethod86(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink87/{param1}") public static Intent intentForDeepLinkMethod87(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink88/{param1}") public static Intent intentForDeepLinkMethod88(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink89/{param1}") public static Intent intentForDeepLinkMethod89(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink90/{param1}") public static Intent intentForDeepLinkMethod90(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink91/{param1}") public static Intent intentForDeepLinkMethod91(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink92/{param1}") public static Intent intentForDeepLinkMethod92(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink93/{param1}") public static Intent intentForDeepLinkMethod93(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink94/{param1}") public static Intent intentForDeepLinkMethod94(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink95/{param1}") public static Intent intentForDeepLinkMethod95(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink96/{param1}") public static Intent intentForDeepLinkMethod96(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink97/{param1}") public static Intent intentForDeepLinkMethod97(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink98/{param1}") public static Intent intentForDeepLinkMethod98(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink99/{param1}") public static Intent intentForDeepLinkMethod99(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink100/{param1}") public static Intent intentForDeepLinkMethod100(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink101/{param1}") public static Intent intentForDeepLinkMethod101(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink102/{param1}") public static Intent intentForDeepLinkMethod102(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink103/{param1}") public static Intent intentForDeepLinkMethod103(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink104/{param1}") public static Intent intentForDeepLinkMethod104(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink105/{param1}") public static Intent intentForDeepLinkMethod105(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink106/{param1}") public static Intent intentForDeepLinkMethod106(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink107/{param1}") public static Intent intentForDeepLinkMethod107(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink108/{param1}") public static Intent intentForDeepLinkMethod108(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink109/{param1}") public static Intent intentForDeepLinkMethod109(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink110/{param1}") public static Intent intentForDeepLinkMethod110(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink111/{param1}") public static Intent intentForDeepLinkMethod111(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink112/{param1}") public static Intent intentForDeepLinkMethod112(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink113/{param1}") public static Intent intentForDeepLinkMethod113(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink114/{param1}") public static Intent intentForDeepLinkMethod114(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink115/{param1}") public static Intent intentForDeepLinkMethod115(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink116/{param1}") public static Intent intentForDeepLinkMethod116(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink117/{param1}") public static Intent intentForDeepLinkMethod117(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink118/{param1}") public static Intent intentForDeepLinkMethod118(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink119/{param1}") public static Intent intentForDeepLinkMethod119(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink120/{param1}") public static Intent intentForDeepLinkMethod120(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink121/{param1}") public static Intent intentForDeepLinkMethod121(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink122/{param1}") public static Intent intentForDeepLinkMethod122(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink123/{param1}") public static Intent intentForDeepLinkMethod123(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink124/{param1}") public static Intent intentForDeepLinkMethod124(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink125/{param1}") public static Intent intentForDeepLinkMethod125(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink126/{param1}") public static Intent intentForDeepLinkMethod126(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink127/{param1}") public static Intent intentForDeepLinkMethod127(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink128/{param1}") public static Intent intentForDeepLinkMethod128(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink129/{param1}") public static Intent intentForDeepLinkMethod129(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink130/{param1}") public static Intent intentForDeepLinkMethod130(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink131/{param1}") public static Intent intentForDeepLinkMethod131(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink132/{param1}") public static Intent intentForDeepLinkMethod132(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink133/{param1}") public static Intent intentForDeepLinkMethod133(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink134/{param1}") public static Intent intentForDeepLinkMethod134(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink135/{param1}") public static Intent intentForDeepLinkMethod135(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink136/{param1}") public static Intent intentForDeepLinkMethod136(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink137/{param1}") public static Intent intentForDeepLinkMethod137(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink138/{param1}") public static Intent intentForDeepLinkMethod138(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink139/{param1}") public static Intent intentForDeepLinkMethod139(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink140/{param1}") public static Intent intentForDeepLinkMethod140(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink141/{param1}") public static Intent intentForDeepLinkMethod141(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink142/{param1}") public static Intent intentForDeepLinkMethod142(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink143/{param1}") public static Intent intentForDeepLinkMethod143(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink144/{param1}") public static Intent intentForDeepLinkMethod144(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink145/{param1}") public static Intent intentForDeepLinkMethod145(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink146/{param1}") public static Intent intentForDeepLinkMethod146(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink147/{param1}") public static Intent intentForDeepLinkMethod147(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink148/{param1}") public static Intent intentForDeepLinkMethod148(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink149/{param1}") public static Intent intentForDeepLinkMethod149(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink150/{param1}") public static Intent intentForDeepLinkMethod150(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink151/{param1}") public static Intent intentForDeepLinkMethod151(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink152/{param1}") public static Intent intentForDeepLinkMethod152(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink153/{param1}") public static Intent intentForDeepLinkMethod153(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink154/{param1}") public static Intent intentForDeepLinkMethod154(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink155/{param1}") public static Intent intentForDeepLinkMethod155(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink156/{param1}") public static Intent intentForDeepLinkMethod156(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink157/{param1}") public static Intent intentForDeepLinkMethod157(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink158/{param1}") public static Intent intentForDeepLinkMethod158(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink159/{param1}") public static Intent intentForDeepLinkMethod159(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink160/{param1}") public static Intent intentForDeepLinkMethod160(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink161/{param1}") public static Intent intentForDeepLinkMethod161(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink162/{param1}") public static Intent intentForDeepLinkMethod162(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink163/{param1}") public static Intent intentForDeepLinkMethod163(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink164/{param1}") public static Intent intentForDeepLinkMethod164(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink165/{param1}") public static Intent intentForDeepLinkMethod165(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink166/{param1}") public static Intent intentForDeepLinkMethod166(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink167/{param1}") public static Intent intentForDeepLinkMethod167(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink168/{param1}") public static Intent intentForDeepLinkMethod168(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink169/{param1}") public static Intent intentForDeepLinkMethod169(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink170/{param1}") public static Intent intentForDeepLinkMethod170(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink171/{param1}") public static Intent intentForDeepLinkMethod171(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink172/{param1}") public static Intent intentForDeepLinkMethod172(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink173/{param1}") public static Intent intentForDeepLinkMethod173(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink174/{param1}") public static Intent intentForDeepLinkMethod174(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink175/{param1}") public static Intent intentForDeepLinkMethod175(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink176/{param1}") public static Intent intentForDeepLinkMethod176(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink177/{param1}") public static Intent intentForDeepLinkMethod177(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink178/{param1}") public static Intent intentForDeepLinkMethod178(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink179/{param1}") public static Intent intentForDeepLinkMethod179(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink180/{param1}") public static Intent intentForDeepLinkMethod180(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink181/{param1}") public static Intent intentForDeepLinkMethod181(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink182/{param1}") public static Intent intentForDeepLinkMethod182(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink183/{param1}") public static Intent intentForDeepLinkMethod183(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink184/{param1}") public static Intent intentForDeepLinkMethod184(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink185/{param1}") public static Intent intentForDeepLinkMethod185(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink186/{param1}") public static Intent intentForDeepLinkMethod186(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink187/{param1}") public static Intent intentForDeepLinkMethod187(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink188/{param1}") public static Intent intentForDeepLinkMethod188(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink189/{param1}") public static Intent intentForDeepLinkMethod189(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink190/{param1}") public static Intent intentForDeepLinkMethod190(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink191/{param1}") public static Intent intentForDeepLinkMethod191(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink192/{param1}") public static Intent intentForDeepLinkMethod192(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink193/{param1}") public static Intent intentForDeepLinkMethod193(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink194/{param1}") public static Intent intentForDeepLinkMethod194(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink195/{param1}") public static Intent intentForDeepLinkMethod195(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink196/{param1}") public static Intent intentForDeepLinkMethod196(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink197/{param1}") public static Intent intentForDeepLinkMethod197(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink198/{param1}") public static Intent intentForDeepLinkMethod198(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink199/{param1}") public static Intent intentForDeepLinkMethod199(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink200/{param1}") public static Intent intentForDeepLinkMethod200(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink201/{param1}") public static Intent intentForDeepLinkMethod201(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink202/{param1}") public static Intent intentForDeepLinkMethod202(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink203/{param1}") public static Intent intentForDeepLinkMethod203(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink204/{param1}") public static Intent intentForDeepLinkMethod204(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink205/{param1}") public static Intent intentForDeepLinkMethod205(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink206/{param1}") public static Intent intentForDeepLinkMethod206(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink207/{param1}") public static Intent intentForDeepLinkMethod207(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink208/{param1}") public static Intent intentForDeepLinkMethod208(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink209/{param1}") public static Intent intentForDeepLinkMethod209(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink210/{param1}") public static Intent intentForDeepLinkMethod210(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink211/{param1}") public static Intent intentForDeepLinkMethod211(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink212/{param1}") public static Intent intentForDeepLinkMethod212(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink213/{param1}") public static Intent intentForDeepLinkMethod213(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink214/{param1}") public static Intent intentForDeepLinkMethod214(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink215/{param1}") public static Intent intentForDeepLinkMethod215(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink216/{param1}") public static Intent intentForDeepLinkMethod216(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink217/{param1}") public static Intent intentForDeepLinkMethod217(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink218/{param1}") public static Intent intentForDeepLinkMethod218(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink219/{param1}") public static Intent intentForDeepLinkMethod219(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink220/{param1}") public static Intent intentForDeepLinkMethod220(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink221/{param1}") public static Intent intentForDeepLinkMethod221(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink222/{param1}") public static Intent intentForDeepLinkMethod222(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink223/{param1}") public static Intent intentForDeepLinkMethod223(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink224/{param1}") public static Intent intentForDeepLinkMethod224(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink225/{param1}") public static Intent intentForDeepLinkMethod225(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink226/{param1}") public static Intent intentForDeepLinkMethod226(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink227/{param1}") public static Intent intentForDeepLinkMethod227(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink228/{param1}") public static Intent intentForDeepLinkMethod228(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink229/{param1}") public static Intent intentForDeepLinkMethod229(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink230/{param1}") public static Intent intentForDeepLinkMethod230(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink231/{param1}") public static Intent intentForDeepLinkMethod231(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink232/{param1}") public static Intent intentForDeepLinkMethod232(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink233/{param1}") public static Intent intentForDeepLinkMethod233(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink234/{param1}") public static Intent intentForDeepLinkMethod234(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink235/{param1}") public static Intent intentForDeepLinkMethod235(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink236/{param1}") public static Intent intentForDeepLinkMethod236(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink237/{param1}") public static Intent intentForDeepLinkMethod237(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink238/{param1}") public static Intent intentForDeepLinkMethod238(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink239/{param1}") public static Intent intentForDeepLinkMethod239(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink240/{param1}") public static Intent intentForDeepLinkMethod240(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink241/{param1}") public static Intent intentForDeepLinkMethod241(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink242/{param1}") public static Intent intentForDeepLinkMethod242(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink243/{param1}") public static Intent intentForDeepLinkMethod243(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink244/{param1}") public static Intent intentForDeepLinkMethod244(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink245/{param1}") public static Intent intentForDeepLinkMethod245(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink246/{param1}") public static Intent intentForDeepLinkMethod246(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink247/{param1}") public static Intent intentForDeepLinkMethod247(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink248/{param1}") public static Intent intentForDeepLinkMethod248(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink249/{param1}") public static Intent intentForDeepLinkMethod249(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink250/{param1}") public static Intent intentForDeepLinkMethod250(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink251/{param1}") public static Intent intentForDeepLinkMethod251(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink252/{param1}") public static Intent intentForDeepLinkMethod252(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink253/{param1}") public static Intent intentForDeepLinkMethod253(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink254/{param1}") public static Intent intentForDeepLinkMethod254(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink255/{param1}") public static Intent intentForDeepLinkMethod255(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink256/{param1}") public static Intent intentForDeepLinkMethod256(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink257/{param1}") public static Intent intentForDeepLinkMethod257(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink258/{param1}") public static Intent intentForDeepLinkMethod258(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink259/{param1}") public static Intent intentForDeepLinkMethod259(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink260/{param1}") public static Intent intentForDeepLinkMethod260(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink261/{param1}") public static Intent intentForDeepLinkMethod261(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink262/{param1}") public static Intent intentForDeepLinkMethod262(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink263/{param1}") public static Intent intentForDeepLinkMethod263(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink264/{param1}") public static Intent intentForDeepLinkMethod264(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink265/{param1}") public static Intent intentForDeepLinkMethod265(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink266/{param1}") public static Intent intentForDeepLinkMethod266(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink267/{param1}") public static Intent intentForDeepLinkMethod267(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink268/{param1}") public static Intent intentForDeepLinkMethod268(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink269/{param1}") public static Intent intentForDeepLinkMethod269(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink270/{param1}") public static Intent intentForDeepLinkMethod270(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink271/{param1}") public static Intent intentForDeepLinkMethod271(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink272/{param1}") public static Intent intentForDeepLinkMethod272(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink273/{param1}") public static Intent intentForDeepLinkMethod273(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink274/{param1}") public static Intent intentForDeepLinkMethod274(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink275/{param1}") public static Intent intentForDeepLinkMethod275(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink276/{param1}") public static Intent intentForDeepLinkMethod276(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink277/{param1}") public static Intent intentForDeepLinkMethod277(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink278/{param1}") public static Intent intentForDeepLinkMethod278(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink279/{param1}") public static Intent intentForDeepLinkMethod279(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink280/{param1}") public static Intent intentForDeepLinkMethod280(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink281/{param1}") public static Intent intentForDeepLinkMethod281(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink282/{param1}") public static Intent intentForDeepLinkMethod282(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink283/{param1}") public static Intent intentForDeepLinkMethod283(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink284/{param1}") public static Intent intentForDeepLinkMethod284(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink285/{param1}") public static Intent intentForDeepLinkMethod285(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink286/{param1}") public static Intent intentForDeepLinkMethod286(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink287/{param1}") public static Intent intentForDeepLinkMethod287(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink288/{param1}") public static Intent intentForDeepLinkMethod288(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink289/{param1}") public static Intent intentForDeepLinkMethod289(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink290/{param1}") public static Intent intentForDeepLinkMethod290(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink291/{param1}") public static Intent intentForDeepLinkMethod291(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink292/{param1}") public static Intent intentForDeepLinkMethod292(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink293/{param1}") public static Intent intentForDeepLinkMethod293(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink294/{param1}") public static Intent intentForDeepLinkMethod294(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink295/{param1}") public static Intent intentForDeepLinkMethod295(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink296/{param1}") public static Intent intentForDeepLinkMethod296(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink297/{param1}") public static Intent intentForDeepLinkMethod297(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink298/{param1}") public static Intent intentForDeepLinkMethod298(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink299/{param1}") public static Intent intentForDeepLinkMethod299(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink300/{param1}") public static Intent intentForDeepLinkMethod300(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink301/{param1}") public static Intent intentForDeepLinkMethod301(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink302/{param1}") public static Intent intentForDeepLinkMethod302(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink303/{param1}") public static Intent intentForDeepLinkMethod303(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink304/{param1}") public static Intent intentForDeepLinkMethod304(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink305/{param1}") public static Intent intentForDeepLinkMethod305(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink306/{param1}") public static Intent intentForDeepLinkMethod306(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink307/{param1}") public static Intent intentForDeepLinkMethod307(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink308/{param1}") public static Intent intentForDeepLinkMethod308(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink309/{param1}") public static Intent intentForDeepLinkMethod309(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink310/{param1}") public static Intent intentForDeepLinkMethod310(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink311/{param1}") public static Intent intentForDeepLinkMethod311(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink312/{param1}") public static Intent intentForDeepLinkMethod312(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink313/{param1}") public static Intent intentForDeepLinkMethod313(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink314/{param1}") public static Intent intentForDeepLinkMethod314(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink315/{param1}") public static Intent intentForDeepLinkMethod315(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink316/{param1}") public static Intent intentForDeepLinkMethod316(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink317/{param1}") public static Intent intentForDeepLinkMethod317(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink318/{param1}") public static Intent intentForDeepLinkMethod318(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink319/{param1}") public static Intent intentForDeepLinkMethod319(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink320/{param1}") public static Intent intentForDeepLinkMethod320(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink321/{param1}") public static Intent intentForDeepLinkMethod321(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink322/{param1}") public static Intent intentForDeepLinkMethod322(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink323/{param1}") public static Intent intentForDeepLinkMethod323(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink324/{param1}") public static Intent intentForDeepLinkMethod324(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink325/{param1}") public static Intent intentForDeepLinkMethod325(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink326/{param1}") public static Intent intentForDeepLinkMethod326(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink327/{param1}") public static Intent intentForDeepLinkMethod327(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink328/{param1}") public static Intent intentForDeepLinkMethod328(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink329/{param1}") public static Intent intentForDeepLinkMethod329(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink330/{param1}") public static Intent intentForDeepLinkMethod330(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink331/{param1}") public static Intent intentForDeepLinkMethod331(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink332/{param1}") public static Intent intentForDeepLinkMethod332(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink333/{param1}") public static Intent intentForDeepLinkMethod333(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink334/{param1}") public static Intent intentForDeepLinkMethod334(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink335/{param1}") public static Intent intentForDeepLinkMethod335(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink336/{param1}") public static Intent intentForDeepLinkMethod336(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink337/{param1}") public static Intent intentForDeepLinkMethod337(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink338/{param1}") public static Intent intentForDeepLinkMethod338(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink339/{param1}") public static Intent intentForDeepLinkMethod339(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink340/{param1}") public static Intent intentForDeepLinkMethod340(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink341/{param1}") public static Intent intentForDeepLinkMethod341(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink342/{param1}") public static Intent intentForDeepLinkMethod342(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink343/{param1}") public static Intent intentForDeepLinkMethod343(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink344/{param1}") public static Intent intentForDeepLinkMethod344(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink345/{param1}") public static Intent intentForDeepLinkMethod345(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink346/{param1}") public static Intent intentForDeepLinkMethod346(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink347/{param1}") public static Intent intentForDeepLinkMethod347(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink348/{param1}") public static Intent intentForDeepLinkMethod348(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink349/{param1}") public static Intent intentForDeepLinkMethod349(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink350/{param1}") public static Intent intentForDeepLinkMethod350(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink351/{param1}") public static Intent intentForDeepLinkMethod351(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink352/{param1}") public static Intent intentForDeepLinkMethod352(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink353/{param1}") public static Intent intentForDeepLinkMethod353(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink354/{param1}") public static Intent intentForDeepLinkMethod354(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink355/{param1}") public static Intent intentForDeepLinkMethod355(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink356/{param1}") public static Intent intentForDeepLinkMethod356(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink357/{param1}") public static Intent intentForDeepLinkMethod357(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink358/{param1}") public static Intent intentForDeepLinkMethod358(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink359/{param1}") public static Intent intentForDeepLinkMethod359(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink360/{param1}") public static Intent intentForDeepLinkMethod360(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink361/{param1}") public static Intent intentForDeepLinkMethod361(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink362/{param1}") public static Intent intentForDeepLinkMethod362(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink363/{param1}") public static Intent intentForDeepLinkMethod363(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink364/{param1}") public static Intent intentForDeepLinkMethod364(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink365/{param1}") public static Intent intentForDeepLinkMethod365(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink366/{param1}") public static Intent intentForDeepLinkMethod366(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink367/{param1}") public static Intent intentForDeepLinkMethod367(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink368/{param1}") public static Intent intentForDeepLinkMethod368(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink369/{param1}") public static Intent intentForDeepLinkMethod369(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink370/{param1}") public static Intent intentForDeepLinkMethod370(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink371/{param1}") public static Intent intentForDeepLinkMethod371(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink372/{param1}") public static Intent intentForDeepLinkMethod372(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink373/{param1}") public static Intent intentForDeepLinkMethod373(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink374/{param1}") public static Intent intentForDeepLinkMethod374(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink375/{param1}") public static Intent intentForDeepLinkMethod375(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink376/{param1}") public static Intent intentForDeepLinkMethod376(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink377/{param1}") public static Intent intentForDeepLinkMethod377(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink378/{param1}") public static Intent intentForDeepLinkMethod378(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink379/{param1}") public static Intent intentForDeepLinkMethod379(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink380/{param1}") public static Intent intentForDeepLinkMethod380(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink381/{param1}") public static Intent intentForDeepLinkMethod381(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink382/{param1}") public static Intent intentForDeepLinkMethod382(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink383/{param1}") public static Intent intentForDeepLinkMethod383(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink384/{param1}") public static Intent intentForDeepLinkMethod384(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink385/{param1}") public static Intent intentForDeepLinkMethod385(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink386/{param1}") public static Intent intentForDeepLinkMethod386(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink387/{param1}") public static Intent intentForDeepLinkMethod387(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink388/{param1}") public static Intent intentForDeepLinkMethod388(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink389/{param1}") public static Intent intentForDeepLinkMethod389(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink390/{param1}") public static Intent intentForDeepLinkMethod390(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink391/{param1}") public static Intent intentForDeepLinkMethod391(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink392/{param1}") public static Intent intentForDeepLinkMethod392(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink393/{param1}") public static Intent intentForDeepLinkMethod393(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink394/{param1}") public static Intent intentForDeepLinkMethod394(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink395/{param1}") public static Intent intentForDeepLinkMethod395(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink396/{param1}") public static Intent intentForDeepLinkMethod396(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink397/{param1}") public static Intent intentForDeepLinkMethod397(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink398/{param1}") public static Intent intentForDeepLinkMethod398(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink399/{param1}") public static Intent intentForDeepLinkMethod399(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink400/{param1}") public static Intent intentForDeepLinkMethod400(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink401/{param1}") public static Intent intentForDeepLinkMethod401(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink402/{param1}") public static Intent intentForDeepLinkMethod402(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink403/{param1}") public static Intent intentForDeepLinkMethod403(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink404/{param1}") public static Intent intentForDeepLinkMethod404(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink405/{param1}") public static Intent intentForDeepLinkMethod405(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink406/{param1}") public static Intent intentForDeepLinkMethod406(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink407/{param1}") public static Intent intentForDeepLinkMethod407(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink408/{param1}") public static Intent intentForDeepLinkMethod408(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink409/{param1}") public static Intent intentForDeepLinkMethod409(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink410/{param1}") public static Intent intentForDeepLinkMethod410(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink411/{param1}") public static Intent intentForDeepLinkMethod411(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink412/{param1}") public static Intent intentForDeepLinkMethod412(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink413/{param1}") public static Intent intentForDeepLinkMethod413(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink414/{param1}") public static Intent intentForDeepLinkMethod414(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink415/{param1}") public static Intent intentForDeepLinkMethod415(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink416/{param1}") public static Intent intentForDeepLinkMethod416(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink417/{param1}") public static Intent intentForDeepLinkMethod417(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink418/{param1}") public static Intent intentForDeepLinkMethod418(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink419/{param1}") public static Intent intentForDeepLinkMethod419(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink420/{param1}") public static Intent intentForDeepLinkMethod420(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink421/{param1}") public static Intent intentForDeepLinkMethod421(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink422/{param1}") public static Intent intentForDeepLinkMethod422(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink423/{param1}") public static Intent intentForDeepLinkMethod423(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink424/{param1}") public static Intent intentForDeepLinkMethod424(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink425/{param1}") public static Intent intentForDeepLinkMethod425(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink426/{param1}") public static Intent intentForDeepLinkMethod426(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink427/{param1}") public static Intent intentForDeepLinkMethod427(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink428/{param1}") public static Intent intentForDeepLinkMethod428(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink429/{param1}") public static Intent intentForDeepLinkMethod429(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink430/{param1}") public static Intent intentForDeepLinkMethod430(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink431/{param1}") public static Intent intentForDeepLinkMethod431(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink432/{param1}") public static Intent intentForDeepLinkMethod432(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink433/{param1}") public static Intent intentForDeepLinkMethod433(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink434/{param1}") public static Intent intentForDeepLinkMethod434(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink435/{param1}") public static Intent intentForDeepLinkMethod435(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink436/{param1}") public static Intent intentForDeepLinkMethod436(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink437/{param1}") public static Intent intentForDeepLinkMethod437(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink438/{param1}") public static Intent intentForDeepLinkMethod438(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink439/{param1}") public static Intent intentForDeepLinkMethod439(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink440/{param1}") public static Intent intentForDeepLinkMethod440(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink441/{param1}") public static Intent intentForDeepLinkMethod441(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink442/{param1}") public static Intent intentForDeepLinkMethod442(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink443/{param1}") public static Intent intentForDeepLinkMethod443(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink444/{param1}") public static Intent intentForDeepLinkMethod444(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink445/{param1}") public static Intent intentForDeepLinkMethod445(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink446/{param1}") public static Intent intentForDeepLinkMethod446(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink447/{param1}") public static Intent intentForDeepLinkMethod447(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink448/{param1}") public static Intent intentForDeepLinkMethod448(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink449/{param1}") public static Intent intentForDeepLinkMethod449(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink450/{param1}") public static Intent intentForDeepLinkMethod450(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink451/{param1}") public static Intent intentForDeepLinkMethod451(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink452/{param1}") public static Intent intentForDeepLinkMethod452(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink453/{param1}") public static Intent intentForDeepLinkMethod453(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink454/{param1}") public static Intent intentForDeepLinkMethod454(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink455/{param1}") public static Intent intentForDeepLinkMethod455(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink456/{param1}") public static Intent intentForDeepLinkMethod456(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink457/{param1}") public static Intent intentForDeepLinkMethod457(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink458/{param1}") public static Intent intentForDeepLinkMethod458(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink459/{param1}") public static Intent intentForDeepLinkMethod459(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink460/{param1}") public static Intent intentForDeepLinkMethod460(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink461/{param1}") public static Intent intentForDeepLinkMethod461(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink462/{param1}") public static Intent intentForDeepLinkMethod462(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink463/{param1}") public static Intent intentForDeepLinkMethod463(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink464/{param1}") public static Intent intentForDeepLinkMethod464(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink465/{param1}") public static Intent intentForDeepLinkMethod465(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink466/{param1}") public static Intent intentForDeepLinkMethod466(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink467/{param1}") public static Intent intentForDeepLinkMethod467(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink468/{param1}") public static Intent intentForDeepLinkMethod468(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink469/{param1}") public static Intent intentForDeepLinkMethod469(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink470/{param1}") public static Intent intentForDeepLinkMethod470(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink471/{param1}") public static Intent intentForDeepLinkMethod471(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink472/{param1}") public static Intent intentForDeepLinkMethod472(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink473/{param1}") public static Intent intentForDeepLinkMethod473(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink474/{param1}") public static Intent intentForDeepLinkMethod474(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink475/{param1}") public static Intent intentForDeepLinkMethod475(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink476/{param1}") public static Intent intentForDeepLinkMethod476(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink477/{param1}") public static Intent intentForDeepLinkMethod477(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink478/{param1}") public static Intent intentForDeepLinkMethod478(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink479/{param1}") public static Intent intentForDeepLinkMethod479(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink480/{param1}") public static Intent intentForDeepLinkMethod480(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink481/{param1}") public static Intent intentForDeepLinkMethod481(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink482/{param1}") public static Intent intentForDeepLinkMethod482(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink483/{param1}") public static Intent intentForDeepLinkMethod483(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink484/{param1}") public static Intent intentForDeepLinkMethod484(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink485/{param1}") public static Intent intentForDeepLinkMethod485(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink486/{param1}") public static Intent intentForDeepLinkMethod486(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink487/{param1}") public static Intent intentForDeepLinkMethod487(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink488/{param1}") public static Intent intentForDeepLinkMethod488(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink489/{param1}") public static Intent intentForDeepLinkMethod489(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink490/{param1}") public static Intent intentForDeepLinkMethod490(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink491/{param1}") public static Intent intentForDeepLinkMethod491(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink492/{param1}") public static Intent intentForDeepLinkMethod492(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink493/{param1}") public static Intent intentForDeepLinkMethod493(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink494/{param1}") public static Intent intentForDeepLinkMethod494(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink495/{param1}") public static Intent intentForDeepLinkMethod495(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink496/{param1}") public static Intent intentForDeepLinkMethod496(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink497/{param1}") public static Intent intentForDeepLinkMethod497(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink498/{param1}") public static Intent intentForDeepLinkMethod498(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink499/{param1}") public static Intent intentForDeepLinkMethod499(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink500/{param1}") public static Intent intentForDeepLinkMethod500(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink501/{param1}") public static Intent intentForDeepLinkMethod501(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink502/{param1}") public static Intent intentForDeepLinkMethod502(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink503/{param1}") public static Intent intentForDeepLinkMethod503(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink504/{param1}") public static Intent intentForDeepLinkMethod504(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink505/{param1}") public static Intent intentForDeepLinkMethod505(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink506/{param1}") public static Intent intentForDeepLinkMethod506(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink507/{param1}") public static Intent intentForDeepLinkMethod507(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink508/{param1}") public static Intent intentForDeepLinkMethod508(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink509/{param1}") public static Intent intentForDeepLinkMethod509(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink510/{param1}") public static Intent intentForDeepLinkMethod510(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink511/{param1}") public static Intent intentForDeepLinkMethod511(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink512/{param1}") public static Intent intentForDeepLinkMethod512(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink513/{param1}") public static Intent intentForDeepLinkMethod513(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink514/{param1}") public static Intent intentForDeepLinkMethod514(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink515/{param1}") public static Intent intentForDeepLinkMethod515(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink516/{param1}") public static Intent intentForDeepLinkMethod516(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink517/{param1}") public static Intent intentForDeepLinkMethod517(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink518/{param1}") public static Intent intentForDeepLinkMethod518(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink519/{param1}") public static Intent intentForDeepLinkMethod519(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink520/{param1}") public static Intent intentForDeepLinkMethod520(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink521/{param1}") public static Intent intentForDeepLinkMethod521(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink522/{param1}") public static Intent intentForDeepLinkMethod522(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink523/{param1}") public static Intent intentForDeepLinkMethod523(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink524/{param1}") public static Intent intentForDeepLinkMethod524(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink525/{param1}") public static Intent intentForDeepLinkMethod525(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink526/{param1}") public static Intent intentForDeepLinkMethod526(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink527/{param1}") public static Intent intentForDeepLinkMethod527(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink528/{param1}") public static Intent intentForDeepLinkMethod528(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink529/{param1}") public static Intent intentForDeepLinkMethod529(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink530/{param1}") public static Intent intentForDeepLinkMethod530(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink531/{param1}") public static Intent intentForDeepLinkMethod531(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink532/{param1}") public static Intent intentForDeepLinkMethod532(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink533/{param1}") public static Intent intentForDeepLinkMethod533(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink534/{param1}") public static Intent intentForDeepLinkMethod534(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink535/{param1}") public static Intent intentForDeepLinkMethod535(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink536/{param1}") public static Intent intentForDeepLinkMethod536(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink537/{param1}") public static Intent intentForDeepLinkMethod537(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink538/{param1}") public static Intent intentForDeepLinkMethod538(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink539/{param1}") public static Intent intentForDeepLinkMethod539(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink540/{param1}") public static Intent intentForDeepLinkMethod540(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink541/{param1}") public static Intent intentForDeepLinkMethod541(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink542/{param1}") public static Intent intentForDeepLinkMethod542(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink543/{param1}") public static Intent intentForDeepLinkMethod543(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink544/{param1}") public static Intent intentForDeepLinkMethod544(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink545/{param1}") public static Intent intentForDeepLinkMethod545(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink546/{param1}") public static Intent intentForDeepLinkMethod546(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink547/{param1}") public static Intent intentForDeepLinkMethod547(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink548/{param1}") public static Intent intentForDeepLinkMethod548(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink549/{param1}") public static Intent intentForDeepLinkMethod549(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink550/{param1}") public static Intent intentForDeepLinkMethod550(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink551/{param1}") public static Intent intentForDeepLinkMethod551(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink552/{param1}") public static Intent intentForDeepLinkMethod552(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink553/{param1}") public static Intent intentForDeepLinkMethod553(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink554/{param1}") public static Intent intentForDeepLinkMethod554(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink555/{param1}") public static Intent intentForDeepLinkMethod555(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink556/{param1}") public static Intent intentForDeepLinkMethod556(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink557/{param1}") public static Intent intentForDeepLinkMethod557(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink558/{param1}") public static Intent intentForDeepLinkMethod558(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink559/{param1}") public static Intent intentForDeepLinkMethod559(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink560/{param1}") public static Intent intentForDeepLinkMethod560(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink561/{param1}") public static Intent intentForDeepLinkMethod561(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink562/{param1}") public static Intent intentForDeepLinkMethod562(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink563/{param1}") public static Intent intentForDeepLinkMethod563(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink564/{param1}") public static Intent intentForDeepLinkMethod564(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink565/{param1}") public static Intent intentForDeepLinkMethod565(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink566/{param1}") public static Intent intentForDeepLinkMethod566(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink567/{param1}") public static Intent intentForDeepLinkMethod567(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink568/{param1}") public static Intent intentForDeepLinkMethod568(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink569/{param1}") public static Intent intentForDeepLinkMethod569(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink570/{param1}") public static Intent intentForDeepLinkMethod570(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink571/{param1}") public static Intent intentForDeepLinkMethod571(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink572/{param1}") public static Intent intentForDeepLinkMethod572(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink573/{param1}") public static Intent intentForDeepLinkMethod573(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink574/{param1}") public static Intent intentForDeepLinkMethod574(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink575/{param1}") public static Intent intentForDeepLinkMethod575(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink576/{param1}") public static Intent intentForDeepLinkMethod576(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink577/{param1}") public static Intent intentForDeepLinkMethod577(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink578/{param1}") public static Intent intentForDeepLinkMethod578(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink579/{param1}") public static Intent intentForDeepLinkMethod579(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink580/{param1}") public static Intent intentForDeepLinkMethod580(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink581/{param1}") public static Intent intentForDeepLinkMethod581(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink582/{param1}") public static Intent intentForDeepLinkMethod582(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink583/{param1}") public static Intent intentForDeepLinkMethod583(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink584/{param1}") public static Intent intentForDeepLinkMethod584(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink585/{param1}") public static Intent intentForDeepLinkMethod585(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink586/{param1}") public static Intent intentForDeepLinkMethod586(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink587/{param1}") public static Intent intentForDeepLinkMethod587(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink588/{param1}") public static Intent intentForDeepLinkMethod588(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink589/{param1}") public static Intent intentForDeepLinkMethod589(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink590/{param1}") public static Intent intentForDeepLinkMethod590(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink591/{param1}") public static Intent intentForDeepLinkMethod591(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink592/{param1}") public static Intent intentForDeepLinkMethod592(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink593/{param1}") public static Intent intentForDeepLinkMethod593(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink594/{param1}") public static Intent intentForDeepLinkMethod594(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink595/{param1}") public static Intent intentForDeepLinkMethod595(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink596/{param1}") public static Intent intentForDeepLinkMethod596(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink597/{param1}") public static Intent intentForDeepLinkMethod597(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink598/{param1}") public static Intent intentForDeepLinkMethod598(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink599/{param1}") public static Intent intentForDeepLinkMethod599(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink600/{param1}") public static Intent intentForDeepLinkMethod600(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink601/{param1}") public static Intent intentForDeepLinkMethod601(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink602/{param1}") public static Intent intentForDeepLinkMethod602(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink603/{param1}") public static Intent intentForDeepLinkMethod603(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink604/{param1}") public static Intent intentForDeepLinkMethod604(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink605/{param1}") public static Intent intentForDeepLinkMethod605(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink606/{param1}") public static Intent intentForDeepLinkMethod606(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink607/{param1}") public static Intent intentForDeepLinkMethod607(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink608/{param1}") public static Intent intentForDeepLinkMethod608(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink609/{param1}") public static Intent intentForDeepLinkMethod609(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink610/{param1}") public static Intent intentForDeepLinkMethod610(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink611/{param1}") public static Intent intentForDeepLinkMethod611(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink612/{param1}") public static Intent intentForDeepLinkMethod612(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink613/{param1}") public static Intent intentForDeepLinkMethod613(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink614/{param1}") public static Intent intentForDeepLinkMethod614(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink615/{param1}") public static Intent intentForDeepLinkMethod615(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink616/{param1}") public static Intent intentForDeepLinkMethod616(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink617/{param1}") public static Intent intentForDeepLinkMethod617(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink618/{param1}") public static Intent intentForDeepLinkMethod618(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink619/{param1}") public static Intent intentForDeepLinkMethod619(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink620/{param1}") public static Intent intentForDeepLinkMethod620(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink621/{param1}") public static Intent intentForDeepLinkMethod621(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink622/{param1}") public static Intent intentForDeepLinkMethod622(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink623/{param1}") public static Intent intentForDeepLinkMethod623(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink624/{param1}") public static Intent intentForDeepLinkMethod624(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink625/{param1}") public static Intent intentForDeepLinkMethod625(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink626/{param1}") public static Intent intentForDeepLinkMethod626(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink627/{param1}") public static Intent intentForDeepLinkMethod627(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink628/{param1}") public static Intent intentForDeepLinkMethod628(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink629/{param1}") public static Intent intentForDeepLinkMethod629(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink630/{param1}") public static Intent intentForDeepLinkMethod630(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink631/{param1}") public static Intent intentForDeepLinkMethod631(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink632/{param1}") public static Intent intentForDeepLinkMethod632(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink633/{param1}") public static Intent intentForDeepLinkMethod633(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink634/{param1}") public static Intent intentForDeepLinkMethod634(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink635/{param1}") public static Intent intentForDeepLinkMethod635(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink636/{param1}") public static Intent intentForDeepLinkMethod636(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink637/{param1}") public static Intent intentForDeepLinkMethod637(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink638/{param1}") public static Intent intentForDeepLinkMethod638(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink639/{param1}") public static Intent intentForDeepLinkMethod639(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink640/{param1}") public static Intent intentForDeepLinkMethod640(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink641/{param1}") public static Intent intentForDeepLinkMethod641(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink642/{param1}") public static Intent intentForDeepLinkMethod642(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink643/{param1}") public static Intent intentForDeepLinkMethod643(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink644/{param1}") public static Intent intentForDeepLinkMethod644(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink645/{param1}") public static Intent intentForDeepLinkMethod645(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink646/{param1}") public static Intent intentForDeepLinkMethod646(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink647/{param1}") public static Intent intentForDeepLinkMethod647(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink648/{param1}") public static Intent intentForDeepLinkMethod648(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink649/{param1}") public static Intent intentForDeepLinkMethod649(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink650/{param1}") public static Intent intentForDeepLinkMethod650(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink651/{param1}") public static Intent intentForDeepLinkMethod651(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink652/{param1}") public static Intent intentForDeepLinkMethod652(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink653/{param1}") public static Intent intentForDeepLinkMethod653(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink654/{param1}") public static Intent intentForDeepLinkMethod654(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink655/{param1}") public static Intent intentForDeepLinkMethod655(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink656/{param1}") public static Intent intentForDeepLinkMethod656(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink657/{param1}") public static Intent intentForDeepLinkMethod657(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink658/{param1}") public static Intent intentForDeepLinkMethod658(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink659/{param1}") public static Intent intentForDeepLinkMethod659(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink660/{param1}") public static Intent intentForDeepLinkMethod660(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink661/{param1}") public static Intent intentForDeepLinkMethod661(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink662/{param1}") public static Intent intentForDeepLinkMethod662(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink663/{param1}") public static Intent intentForDeepLinkMethod663(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink664/{param1}") public static Intent intentForDeepLinkMethod664(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink665/{param1}") public static Intent intentForDeepLinkMethod665(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink666/{param1}") public static Intent intentForDeepLinkMethod666(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink667/{param1}") public static Intent intentForDeepLinkMethod667(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink668/{param1}") public static Intent intentForDeepLinkMethod668(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink669/{param1}") public static Intent intentForDeepLinkMethod669(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink670/{param1}") public static Intent intentForDeepLinkMethod670(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink671/{param1}") public static Intent intentForDeepLinkMethod671(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink672/{param1}") public static Intent intentForDeepLinkMethod672(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink673/{param1}") public static Intent intentForDeepLinkMethod673(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink674/{param1}") public static Intent intentForDeepLinkMethod674(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink675/{param1}") public static Intent intentForDeepLinkMethod675(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink676/{param1}") public static Intent intentForDeepLinkMethod676(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink677/{param1}") public static Intent intentForDeepLinkMethod677(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink678/{param1}") public static Intent intentForDeepLinkMethod678(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink679/{param1}") public static Intent intentForDeepLinkMethod679(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink680/{param1}") public static Intent intentForDeepLinkMethod680(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink681/{param1}") public static Intent intentForDeepLinkMethod681(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink682/{param1}") public static Intent intentForDeepLinkMethod682(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink683/{param1}") public static Intent intentForDeepLinkMethod683(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink684/{param1}") public static Intent intentForDeepLinkMethod684(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink685/{param1}") public static Intent intentForDeepLinkMethod685(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink686/{param1}") public static Intent intentForDeepLinkMethod686(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink687/{param1}") public static Intent intentForDeepLinkMethod687(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink688/{param1}") public static Intent intentForDeepLinkMethod688(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink689/{param1}") public static Intent intentForDeepLinkMethod689(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink690/{param1}") public static Intent intentForDeepLinkMethod690(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink691/{param1}") public static Intent intentForDeepLinkMethod691(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink692/{param1}") public static Intent intentForDeepLinkMethod692(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink693/{param1}") public static Intent intentForDeepLinkMethod693(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink694/{param1}") public static Intent intentForDeepLinkMethod694(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink695/{param1}") public static Intent intentForDeepLinkMethod695(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink696/{param1}") public static Intent intentForDeepLinkMethod696(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink697/{param1}") public static Intent intentForDeepLinkMethod697(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink698/{param1}") public static Intent intentForDeepLinkMethod698(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink699/{param1}") public static Intent intentForDeepLinkMethod699(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink700/{param1}") public static Intent intentForDeepLinkMethod700(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink701/{param1}") public static Intent intentForDeepLinkMethod701(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink702/{param1}") public static Intent intentForDeepLinkMethod702(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink703/{param1}") public static Intent intentForDeepLinkMethod703(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink704/{param1}") public static Intent intentForDeepLinkMethod704(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink705/{param1}") public static Intent intentForDeepLinkMethod705(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink706/{param1}") public static Intent intentForDeepLinkMethod706(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink707/{param1}") public static Intent intentForDeepLinkMethod707(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink708/{param1}") public static Intent intentForDeepLinkMethod708(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink709/{param1}") public static Intent intentForDeepLinkMethod709(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink710/{param1}") public static Intent intentForDeepLinkMethod710(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink711/{param1}") public static Intent intentForDeepLinkMethod711(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink712/{param1}") public static Intent intentForDeepLinkMethod712(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink713/{param1}") public static Intent intentForDeepLinkMethod713(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink714/{param1}") public static Intent intentForDeepLinkMethod714(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink715/{param1}") public static Intent intentForDeepLinkMethod715(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink716/{param1}") public static Intent intentForDeepLinkMethod716(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink717/{param1}") public static Intent intentForDeepLinkMethod717(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink718/{param1}") public static Intent intentForDeepLinkMethod718(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink719/{param1}") public static Intent intentForDeepLinkMethod719(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink720/{param1}") public static Intent intentForDeepLinkMethod720(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink721/{param1}") public static Intent intentForDeepLinkMethod721(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink722/{param1}") public static Intent intentForDeepLinkMethod722(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink723/{param1}") public static Intent intentForDeepLinkMethod723(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink724/{param1}") public static Intent intentForDeepLinkMethod724(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink725/{param1}") public static Intent intentForDeepLinkMethod725(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink726/{param1}") public static Intent intentForDeepLinkMethod726(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink727/{param1}") public static Intent intentForDeepLinkMethod727(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink728/{param1}") public static Intent intentForDeepLinkMethod728(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink729/{param1}") public static Intent intentForDeepLinkMethod729(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink730/{param1}") public static Intent intentForDeepLinkMethod730(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink731/{param1}") public static Intent intentForDeepLinkMethod731(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink732/{param1}") public static Intent intentForDeepLinkMethod732(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink733/{param1}") public static Intent intentForDeepLinkMethod733(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink734/{param1}") public static Intent intentForDeepLinkMethod734(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink735/{param1}") public static Intent intentForDeepLinkMethod735(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink736/{param1}") public static Intent intentForDeepLinkMethod736(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink737/{param1}") public static Intent intentForDeepLinkMethod737(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink738/{param1}") public static Intent intentForDeepLinkMethod738(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink739/{param1}") public static Intent intentForDeepLinkMethod739(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink740/{param1}") public static Intent intentForDeepLinkMethod740(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink741/{param1}") public static Intent intentForDeepLinkMethod741(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink742/{param1}") public static Intent intentForDeepLinkMethod742(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink743/{param1}") public static Intent intentForDeepLinkMethod743(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink744/{param1}") public static Intent intentForDeepLinkMethod744(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink745/{param1}") public static Intent intentForDeepLinkMethod745(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink746/{param1}") public static Intent intentForDeepLinkMethod746(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink747/{param1}") public static Intent intentForDeepLinkMethod747(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink748/{param1}") public static Intent intentForDeepLinkMethod748(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink749/{param1}") public static Intent intentForDeepLinkMethod749(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink750/{param1}") public static Intent intentForDeepLinkMethod750(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink751/{param1}") public static Intent intentForDeepLinkMethod751(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink752/{param1}") public static Intent intentForDeepLinkMethod752(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink753/{param1}") public static Intent intentForDeepLinkMethod753(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink754/{param1}") public static Intent intentForDeepLinkMethod754(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink755/{param1}") public static Intent intentForDeepLinkMethod755(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink756/{param1}") public static Intent intentForDeepLinkMethod756(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink757/{param1}") public static Intent intentForDeepLinkMethod757(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink758/{param1}") public static Intent intentForDeepLinkMethod758(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink759/{param1}") public static Intent intentForDeepLinkMethod759(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink760/{param1}") public static Intent intentForDeepLinkMethod760(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink761/{param1}") public static Intent intentForDeepLinkMethod761(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink762/{param1}") public static Intent intentForDeepLinkMethod762(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink763/{param1}") public static Intent intentForDeepLinkMethod763(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink764/{param1}") public static Intent intentForDeepLinkMethod764(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink765/{param1}") public static Intent intentForDeepLinkMethod765(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink766/{param1}") public static Intent intentForDeepLinkMethod766(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink767/{param1}") public static Intent intentForDeepLinkMethod767(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink768/{param1}") public static Intent intentForDeepLinkMethod768(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink769/{param1}") public static Intent intentForDeepLinkMethod769(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink770/{param1}") public static Intent intentForDeepLinkMethod770(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink771/{param1}") public static Intent intentForDeepLinkMethod771(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink772/{param1}") public static Intent intentForDeepLinkMethod772(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink773/{param1}") public static Intent intentForDeepLinkMethod773(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink774/{param1}") public static Intent intentForDeepLinkMethod774(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink775/{param1}") public static Intent intentForDeepLinkMethod775(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink776/{param1}") public static Intent intentForDeepLinkMethod776(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink777/{param1}") public static Intent intentForDeepLinkMethod777(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink778/{param1}") public static Intent intentForDeepLinkMethod778(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink779/{param1}") public static Intent intentForDeepLinkMethod779(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink780/{param1}") public static Intent intentForDeepLinkMethod780(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink781/{param1}") public static Intent intentForDeepLinkMethod781(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink782/{param1}") public static Intent intentForDeepLinkMethod782(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink783/{param1}") public static Intent intentForDeepLinkMethod783(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink784/{param1}") public static Intent intentForDeepLinkMethod784(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink785/{param1}") public static Intent intentForDeepLinkMethod785(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink786/{param1}") public static Intent intentForDeepLinkMethod786(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink787/{param1}") public static Intent intentForDeepLinkMethod787(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink788/{param1}") public static Intent intentForDeepLinkMethod788(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink789/{param1}") public static Intent intentForDeepLinkMethod789(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink790/{param1}") public static Intent intentForDeepLinkMethod790(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink791/{param1}") public static Intent intentForDeepLinkMethod791(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink792/{param1}") public static Intent intentForDeepLinkMethod792(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink793/{param1}") public static Intent intentForDeepLinkMethod793(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink794/{param1}") public static Intent intentForDeepLinkMethod794(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink795/{param1}") public static Intent intentForDeepLinkMethod795(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink796/{param1}") public static Intent intentForDeepLinkMethod796(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink797/{param1}") public static Intent intentForDeepLinkMethod797(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink798/{param1}") public static Intent intentForDeepLinkMethod798(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink799/{param1}") public static Intent intentForDeepLinkMethod799(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink800/{param1}") public static Intent intentForDeepLinkMethod800(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink801/{param1}") public static Intent intentForDeepLinkMethod801(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink802/{param1}") public static Intent intentForDeepLinkMethod802(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink803/{param1}") public static Intent intentForDeepLinkMethod803(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink804/{param1}") public static Intent intentForDeepLinkMethod804(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink805/{param1}") public static Intent intentForDeepLinkMethod805(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink806/{param1}") public static Intent intentForDeepLinkMethod806(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink807/{param1}") public static Intent intentForDeepLinkMethod807(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink808/{param1}") public static Intent intentForDeepLinkMethod808(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink809/{param1}") public static Intent intentForDeepLinkMethod809(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink810/{param1}") public static Intent intentForDeepLinkMethod810(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink811/{param1}") public static Intent intentForDeepLinkMethod811(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink812/{param1}") public static Intent intentForDeepLinkMethod812(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink813/{param1}") public static Intent intentForDeepLinkMethod813(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink814/{param1}") public static Intent intentForDeepLinkMethod814(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink815/{param1}") public static Intent intentForDeepLinkMethod815(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink816/{param1}") public static Intent intentForDeepLinkMethod816(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink817/{param1}") public static Intent intentForDeepLinkMethod817(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink818/{param1}") public static Intent intentForDeepLinkMethod818(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink819/{param1}") public static Intent intentForDeepLinkMethod819(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink820/{param1}") public static Intent intentForDeepLinkMethod820(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink821/{param1}") public static Intent intentForDeepLinkMethod821(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink822/{param1}") public static Intent intentForDeepLinkMethod822(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink823/{param1}") public static Intent intentForDeepLinkMethod823(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink824/{param1}") public static Intent intentForDeepLinkMethod824(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink825/{param1}") public static Intent intentForDeepLinkMethod825(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink826/{param1}") public static Intent intentForDeepLinkMethod826(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink827/{param1}") public static Intent intentForDeepLinkMethod827(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink828/{param1}") public static Intent intentForDeepLinkMethod828(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink829/{param1}") public static Intent intentForDeepLinkMethod829(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink830/{param1}") public static Intent intentForDeepLinkMethod830(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink831/{param1}") public static Intent intentForDeepLinkMethod831(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink832/{param1}") public static Intent intentForDeepLinkMethod832(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink833/{param1}") public static Intent intentForDeepLinkMethod833(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink834/{param1}") public static Intent intentForDeepLinkMethod834(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink835/{param1}") public static Intent intentForDeepLinkMethod835(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink836/{param1}") public static Intent intentForDeepLinkMethod836(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink837/{param1}") public static Intent intentForDeepLinkMethod837(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink838/{param1}") public static Intent intentForDeepLinkMethod838(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink839/{param1}") public static Intent intentForDeepLinkMethod839(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink840/{param1}") public static Intent intentForDeepLinkMethod840(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink841/{param1}") public static Intent intentForDeepLinkMethod841(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink842/{param1}") public static Intent intentForDeepLinkMethod842(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink843/{param1}") public static Intent intentForDeepLinkMethod843(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink844/{param1}") public static Intent intentForDeepLinkMethod844(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink845/{param1}") public static Intent intentForDeepLinkMethod845(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink846/{param1}") public static Intent intentForDeepLinkMethod846(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink847/{param1}") public static Intent intentForDeepLinkMethod847(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink848/{param1}") public static Intent intentForDeepLinkMethod848(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink849/{param1}") public static Intent intentForDeepLinkMethod849(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink850/{param1}") public static Intent intentForDeepLinkMethod850(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink851/{param1}") public static Intent intentForDeepLinkMethod851(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink852/{param1}") public static Intent intentForDeepLinkMethod852(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink853/{param1}") public static Intent intentForDeepLinkMethod853(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink854/{param1}") public static Intent intentForDeepLinkMethod854(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink855/{param1}") public static Intent intentForDeepLinkMethod855(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink856/{param1}") public static Intent intentForDeepLinkMethod856(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink857/{param1}") public static Intent intentForDeepLinkMethod857(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink858/{param1}") public static Intent intentForDeepLinkMethod858(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink859/{param1}") public static Intent intentForDeepLinkMethod859(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink860/{param1}") public static Intent intentForDeepLinkMethod860(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink861/{param1}") public static Intent intentForDeepLinkMethod861(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink862/{param1}") public static Intent intentForDeepLinkMethod862(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink863/{param1}") public static Intent intentForDeepLinkMethod863(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink864/{param1}") public static Intent intentForDeepLinkMethod864(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink865/{param1}") public static Intent intentForDeepLinkMethod865(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink866/{param1}") public static Intent intentForDeepLinkMethod866(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink867/{param1}") public static Intent intentForDeepLinkMethod867(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink868/{param1}") public static Intent intentForDeepLinkMethod868(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink869/{param1}") public static Intent intentForDeepLinkMethod869(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink870/{param1}") public static Intent intentForDeepLinkMethod870(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink871/{param1}") public static Intent intentForDeepLinkMethod871(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink872/{param1}") public static Intent intentForDeepLinkMethod872(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink873/{param1}") public static Intent intentForDeepLinkMethod873(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink874/{param1}") public static Intent intentForDeepLinkMethod874(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink875/{param1}") public static Intent intentForDeepLinkMethod875(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink876/{param1}") public static Intent intentForDeepLinkMethod876(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink877/{param1}") public static Intent intentForDeepLinkMethod877(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink878/{param1}") public static Intent intentForDeepLinkMethod878(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink879/{param1}") public static Intent intentForDeepLinkMethod879(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink880/{param1}") public static Intent intentForDeepLinkMethod880(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink881/{param1}") public static Intent intentForDeepLinkMethod881(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink882/{param1}") public static Intent intentForDeepLinkMethod882(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink883/{param1}") public static Intent intentForDeepLinkMethod883(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink884/{param1}") public static Intent intentForDeepLinkMethod884(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink885/{param1}") public static Intent intentForDeepLinkMethod885(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink886/{param1}") public static Intent intentForDeepLinkMethod886(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink887/{param1}") public static Intent intentForDeepLinkMethod887(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink888/{param1}") public static Intent intentForDeepLinkMethod888(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink889/{param1}") public static Intent intentForDeepLinkMethod889(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink890/{param1}") public static Intent intentForDeepLinkMethod890(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink891/{param1}") public static Intent intentForDeepLinkMethod891(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink892/{param1}") public static Intent intentForDeepLinkMethod892(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink893/{param1}") public static Intent intentForDeepLinkMethod893(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink894/{param1}") public static Intent intentForDeepLinkMethod894(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink895/{param1}") public static Intent intentForDeepLinkMethod895(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink896/{param1}") public static Intent intentForDeepLinkMethod896(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink897/{param1}") public static Intent intentForDeepLinkMethod897(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink898/{param1}") public static Intent intentForDeepLinkMethod898(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink899/{param1}") public static Intent intentForDeepLinkMethod899(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink900/{param1}") public static Intent intentForDeepLinkMethod900(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink901/{param1}") public static Intent intentForDeepLinkMethod901(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink902/{param1}") public static Intent intentForDeepLinkMethod902(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink903/{param1}") public static Intent intentForDeepLinkMethod903(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink904/{param1}") public static Intent intentForDeepLinkMethod904(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink905/{param1}") public static Intent intentForDeepLinkMethod905(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink906/{param1}") public static Intent intentForDeepLinkMethod906(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink907/{param1}") public static Intent intentForDeepLinkMethod907(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink908/{param1}") public static Intent intentForDeepLinkMethod908(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink909/{param1}") public static Intent intentForDeepLinkMethod909(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink910/{param1}") public static Intent intentForDeepLinkMethod910(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink911/{param1}") public static Intent intentForDeepLinkMethod911(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink912/{param1}") public static Intent intentForDeepLinkMethod912(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink913/{param1}") public static Intent intentForDeepLinkMethod913(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink914/{param1}") public static Intent intentForDeepLinkMethod914(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink915/{param1}") public static Intent intentForDeepLinkMethod915(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink916/{param1}") public static Intent intentForDeepLinkMethod916(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink917/{param1}") public static Intent intentForDeepLinkMethod917(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink918/{param1}") public static Intent intentForDeepLinkMethod918(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink919/{param1}") public static Intent intentForDeepLinkMethod919(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink920/{param1}") public static Intent intentForDeepLinkMethod920(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink921/{param1}") public static Intent intentForDeepLinkMethod921(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink922/{param1}") public static Intent intentForDeepLinkMethod922(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink923/{param1}") public static Intent intentForDeepLinkMethod923(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink924/{param1}") public static Intent intentForDeepLinkMethod924(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink925/{param1}") public static Intent intentForDeepLinkMethod925(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink926/{param1}") public static Intent intentForDeepLinkMethod926(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink927/{param1}") public static Intent intentForDeepLinkMethod927(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink928/{param1}") public static Intent intentForDeepLinkMethod928(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink929/{param1}") public static Intent intentForDeepLinkMethod929(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink930/{param1}") public static Intent intentForDeepLinkMethod930(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink931/{param1}") public static Intent intentForDeepLinkMethod931(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink932/{param1}") public static Intent intentForDeepLinkMethod932(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink933/{param1}") public static Intent intentForDeepLinkMethod933(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink934/{param1}") public static Intent intentForDeepLinkMethod934(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink935/{param1}") public static Intent intentForDeepLinkMethod935(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink936/{param1}") public static Intent intentForDeepLinkMethod936(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink937/{param1}") public static Intent intentForDeepLinkMethod937(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink938/{param1}") public static Intent intentForDeepLinkMethod938(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink939/{param1}") public static Intent intentForDeepLinkMethod939(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink940/{param1}") public static Intent intentForDeepLinkMethod940(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink941/{param1}") public static Intent intentForDeepLinkMethod941(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink942/{param1}") public static Intent intentForDeepLinkMethod942(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink943/{param1}") public static Intent intentForDeepLinkMethod943(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink944/{param1}") public static Intent intentForDeepLinkMethod944(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink945/{param1}") public static Intent intentForDeepLinkMethod945(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink946/{param1}") public static Intent intentForDeepLinkMethod946(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink947/{param1}") public static Intent intentForDeepLinkMethod947(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink948/{param1}") public static Intent intentForDeepLinkMethod948(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink949/{param1}") public static Intent intentForDeepLinkMethod949(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink950/{param1}") public static Intent intentForDeepLinkMethod950(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink951/{param1}") public static Intent intentForDeepLinkMethod951(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink952/{param1}") public static Intent intentForDeepLinkMethod952(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink953/{param1}") public static Intent intentForDeepLinkMethod953(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink954/{param1}") public static Intent intentForDeepLinkMethod954(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink955/{param1}") public static Intent intentForDeepLinkMethod955(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink956/{param1}") public static Intent intentForDeepLinkMethod956(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink957/{param1}") public static Intent intentForDeepLinkMethod957(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink958/{param1}") public static Intent intentForDeepLinkMethod958(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink959/{param1}") public static Intent intentForDeepLinkMethod959(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink960/{param1}") public static Intent intentForDeepLinkMethod960(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink961/{param1}") public static Intent intentForDeepLinkMethod961(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink962/{param1}") public static Intent intentForDeepLinkMethod962(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink963/{param1}") public static Intent intentForDeepLinkMethod963(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink964/{param1}") public static Intent intentForDeepLinkMethod964(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink965/{param1}") public static Intent intentForDeepLinkMethod965(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink966/{param1}") public static Intent intentForDeepLinkMethod966(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink967/{param1}") public static Intent intentForDeepLinkMethod967(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink968/{param1}") public static Intent intentForDeepLinkMethod968(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink969/{param1}") public static Intent intentForDeepLinkMethod969(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink970/{param1}") public static Intent intentForDeepLinkMethod970(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink971/{param1}") public static Intent intentForDeepLinkMethod971(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink972/{param1}") public static Intent intentForDeepLinkMethod972(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink973/{param1}") public static Intent intentForDeepLinkMethod973(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink974/{param1}") public static Intent intentForDeepLinkMethod974(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink975/{param1}") public static Intent intentForDeepLinkMethod975(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink976/{param1}") public static Intent intentForDeepLinkMethod976(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink977/{param1}") public static Intent intentForDeepLinkMethod977(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink978/{param1}") public static Intent intentForDeepLinkMethod978(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink979/{param1}") public static Intent intentForDeepLinkMethod979(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink980/{param1}") public static Intent intentForDeepLinkMethod980(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink981/{param1}") public static Intent intentForDeepLinkMethod981(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink982/{param1}") public static Intent intentForDeepLinkMethod982(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink983/{param1}") public static Intent intentForDeepLinkMethod983(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink984/{param1}") public static Intent intentForDeepLinkMethod984(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink985/{param1}") public static Intent intentForDeepLinkMethod985(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink986/{param1}") public static Intent intentForDeepLinkMethod986(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink987/{param1}") public static Intent intentForDeepLinkMethod987(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink988/{param1}") public static Intent intentForDeepLinkMethod988(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink989/{param1}") public static Intent intentForDeepLinkMethod989(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink990/{param1}") public static Intent intentForDeepLinkMethod990(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink991/{param1}") public static Intent intentForDeepLinkMethod991(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink992/{param1}") public static Intent intentForDeepLinkMethod992(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink993/{param1}") public static Intent intentForDeepLinkMethod993(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink994/{param1}") public static Intent intentForDeepLinkMethod994(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink995/{param1}") public static Intent intentForDeepLinkMethod995(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink996/{param1}") public static Intent intentForDeepLinkMethod996(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink997/{param1}") public static Intent intentForDeepLinkMethod997(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink998/{param1}") public static Intent intentForDeepLinkMethod998(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink999/{param1}") public static Intent intentForDeepLinkMethod999(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1000/{param1}") public static Intent intentForDeepLinkMethod1000(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1001/{param1}") public static Intent intentForDeepLinkMethod1001(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1002/{param1}") public static Intent intentForDeepLinkMethod1002(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1003/{param1}") public static Intent intentForDeepLinkMethod1003(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1004/{param1}") public static Intent intentForDeepLinkMethod1004(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1005/{param1}") public static Intent intentForDeepLinkMethod1005(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1006/{param1}") public static Intent intentForDeepLinkMethod1006(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1007/{param1}") public static Intent intentForDeepLinkMethod1007(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1008/{param1}") public static Intent intentForDeepLinkMethod1008(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1009/{param1}") public static Intent intentForDeepLinkMethod1009(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1010/{param1}") public static Intent intentForDeepLinkMethod1010(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1011/{param1}") public static Intent intentForDeepLinkMethod1011(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1012/{param1}") public static Intent intentForDeepLinkMethod1012(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1013/{param1}") public static Intent intentForDeepLinkMethod1013(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1014/{param1}") public static Intent intentForDeepLinkMethod1014(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1015/{param1}") public static Intent intentForDeepLinkMethod1015(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1016/{param1}") public static Intent intentForDeepLinkMethod1016(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1017/{param1}") public static Intent intentForDeepLinkMethod1017(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1018/{param1}") public static Intent intentForDeepLinkMethod1018(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1019/{param1}") public static Intent intentForDeepLinkMethod1019(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1020/{param1}") public static Intent intentForDeepLinkMethod1020(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1021/{param1}") public static Intent intentForDeepLinkMethod1021(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1022/{param1}") public static Intent intentForDeepLinkMethod1022(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1023/{param1}") public static Intent intentForDeepLinkMethod1023(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1024/{param1}") public static Intent intentForDeepLinkMethod1024(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1025/{param1}") public static Intent intentForDeepLinkMethod1025(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1026/{param1}") public static Intent intentForDeepLinkMethod1026(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1027/{param1}") public static Intent intentForDeepLinkMethod1027(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1028/{param1}") public static Intent intentForDeepLinkMethod1028(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1029/{param1}") public static Intent intentForDeepLinkMethod1029(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1030/{param1}") public static Intent intentForDeepLinkMethod1030(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1031/{param1}") public static Intent intentForDeepLinkMethod1031(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1032/{param1}") public static Intent intentForDeepLinkMethod1032(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1033/{param1}") public static Intent intentForDeepLinkMethod1033(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1034/{param1}") public static Intent intentForDeepLinkMethod1034(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1035/{param1}") public static Intent intentForDeepLinkMethod1035(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1036/{param1}") public static Intent intentForDeepLinkMethod1036(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1037/{param1}") public static Intent intentForDeepLinkMethod1037(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1038/{param1}") public static Intent intentForDeepLinkMethod1038(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1039/{param1}") public static Intent intentForDeepLinkMethod1039(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1040/{param1}") public static Intent intentForDeepLinkMethod1040(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1041/{param1}") public static Intent intentForDeepLinkMethod1041(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1042/{param1}") public static Intent intentForDeepLinkMethod1042(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1043/{param1}") public static Intent intentForDeepLinkMethod1043(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1044/{param1}") public static Intent intentForDeepLinkMethod1044(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1045/{param1}") public static Intent intentForDeepLinkMethod1045(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1046/{param1}") public static Intent intentForDeepLinkMethod1046(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1047/{param1}") public static Intent intentForDeepLinkMethod1047(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1048/{param1}") public static Intent intentForDeepLinkMethod1048(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1049/{param1}") public static Intent intentForDeepLinkMethod1049(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1050/{param1}") public static Intent intentForDeepLinkMethod1050(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1051/{param1}") public static Intent intentForDeepLinkMethod1051(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1052/{param1}") public static Intent intentForDeepLinkMethod1052(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1053/{param1}") public static Intent intentForDeepLinkMethod1053(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1054/{param1}") public static Intent intentForDeepLinkMethod1054(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1055/{param1}") public static Intent intentForDeepLinkMethod1055(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1056/{param1}") public static Intent intentForDeepLinkMethod1056(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1057/{param1}") public static Intent intentForDeepLinkMethod1057(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1058/{param1}") public static Intent intentForDeepLinkMethod1058(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1059/{param1}") public static Intent intentForDeepLinkMethod1059(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1060/{param1}") public static Intent intentForDeepLinkMethod1060(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1061/{param1}") public static Intent intentForDeepLinkMethod1061(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1062/{param1}") public static Intent intentForDeepLinkMethod1062(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1063/{param1}") public static Intent intentForDeepLinkMethod1063(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1064/{param1}") public static Intent intentForDeepLinkMethod1064(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1065/{param1}") public static Intent intentForDeepLinkMethod1065(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1066/{param1}") public static Intent intentForDeepLinkMethod1066(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1067/{param1}") public static Intent intentForDeepLinkMethod1067(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1068/{param1}") public static Intent intentForDeepLinkMethod1068(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1069/{param1}") public static Intent intentForDeepLinkMethod1069(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1070/{param1}") public static Intent intentForDeepLinkMethod1070(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1071/{param1}") public static Intent intentForDeepLinkMethod1071(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1072/{param1}") public static Intent intentForDeepLinkMethod1072(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1073/{param1}") public static Intent intentForDeepLinkMethod1073(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1074/{param1}") public static Intent intentForDeepLinkMethod1074(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1075/{param1}") public static Intent intentForDeepLinkMethod1075(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1076/{param1}") public static Intent intentForDeepLinkMethod1076(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1077/{param1}") public static Intent intentForDeepLinkMethod1077(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1078/{param1}") public static Intent intentForDeepLinkMethod1078(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1079/{param1}") public static Intent intentForDeepLinkMethod1079(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1080/{param1}") public static Intent intentForDeepLinkMethod1080(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1081/{param1}") public static Intent intentForDeepLinkMethod1081(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1082/{param1}") public static Intent intentForDeepLinkMethod1082(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1083/{param1}") public static Intent intentForDeepLinkMethod1083(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1084/{param1}") public static Intent intentForDeepLinkMethod1084(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1085/{param1}") public static Intent intentForDeepLinkMethod1085(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1086/{param1}") public static Intent intentForDeepLinkMethod1086(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1087/{param1}") public static Intent intentForDeepLinkMethod1087(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1088/{param1}") public static Intent intentForDeepLinkMethod1088(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1089/{param1}") public static Intent intentForDeepLinkMethod1089(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1090/{param1}") public static Intent intentForDeepLinkMethod1090(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1091/{param1}") public static Intent intentForDeepLinkMethod1091(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1092/{param1}") public static Intent intentForDeepLinkMethod1092(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1093/{param1}") public static Intent intentForDeepLinkMethod1093(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1094/{param1}") public static Intent intentForDeepLinkMethod1094(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1095/{param1}") public static Intent intentForDeepLinkMethod1095(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1096/{param1}") public static Intent intentForDeepLinkMethod1096(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1097/{param1}") public static Intent intentForDeepLinkMethod1097(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1098/{param1}") public static Intent intentForDeepLinkMethod1098(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1099/{param1}") public static Intent intentForDeepLinkMethod1099(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1100/{param1}") public static Intent intentForDeepLinkMethod1100(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1101/{param1}") public static Intent intentForDeepLinkMethod1101(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1102/{param1}") public static Intent intentForDeepLinkMethod1102(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1103/{param1}") public static Intent intentForDeepLinkMethod1103(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1104/{param1}") public static Intent intentForDeepLinkMethod1104(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1105/{param1}") public static Intent intentForDeepLinkMethod1105(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1106/{param1}") public static Intent intentForDeepLinkMethod1106(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1107/{param1}") public static Intent intentForDeepLinkMethod1107(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1108/{param1}") public static Intent intentForDeepLinkMethod1108(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1109/{param1}") public static Intent intentForDeepLinkMethod1109(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1110/{param1}") public static Intent intentForDeepLinkMethod1110(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1111/{param1}") public static Intent intentForDeepLinkMethod1111(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1112/{param1}") public static Intent intentForDeepLinkMethod1112(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1113/{param1}") public static Intent intentForDeepLinkMethod1113(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1114/{param1}") public static Intent intentForDeepLinkMethod1114(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1115/{param1}") public static Intent intentForDeepLinkMethod1115(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1116/{param1}") public static Intent intentForDeepLinkMethod1116(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1117/{param1}") public static Intent intentForDeepLinkMethod1117(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1118/{param1}") public static Intent intentForDeepLinkMethod1118(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1119/{param1}") public static Intent intentForDeepLinkMethod1119(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1120/{param1}") public static Intent intentForDeepLinkMethod1120(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1121/{param1}") public static Intent intentForDeepLinkMethod1121(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1122/{param1}") public static Intent intentForDeepLinkMethod1122(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1123/{param1}") public static Intent intentForDeepLinkMethod1123(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1124/{param1}") public static Intent intentForDeepLinkMethod1124(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1125/{param1}") public static Intent intentForDeepLinkMethod1125(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1126/{param1}") public static Intent intentForDeepLinkMethod1126(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1127/{param1}") public static Intent intentForDeepLinkMethod1127(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1128/{param1}") public static Intent intentForDeepLinkMethod1128(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1129/{param1}") public static Intent intentForDeepLinkMethod1129(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1130/{param1}") public static Intent intentForDeepLinkMethod1130(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1131/{param1}") public static Intent intentForDeepLinkMethod1131(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1132/{param1}") public static Intent intentForDeepLinkMethod1132(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1133/{param1}") public static Intent intentForDeepLinkMethod1133(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1134/{param1}") public static Intent intentForDeepLinkMethod1134(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1135/{param1}") public static Intent intentForDeepLinkMethod1135(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1136/{param1}") public static Intent intentForDeepLinkMethod1136(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1137/{param1}") public static Intent intentForDeepLinkMethod1137(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1138/{param1}") public static Intent intentForDeepLinkMethod1138(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1139/{param1}") public static Intent intentForDeepLinkMethod1139(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1140/{param1}") public static Intent intentForDeepLinkMethod1140(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1141/{param1}") public static Intent intentForDeepLinkMethod1141(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1142/{param1}") public static Intent intentForDeepLinkMethod1142(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1143/{param1}") public static Intent intentForDeepLinkMethod1143(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1144/{param1}") public static Intent intentForDeepLinkMethod1144(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1145/{param1}") public static Intent intentForDeepLinkMethod1145(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1146/{param1}") public static Intent intentForDeepLinkMethod1146(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1147/{param1}") public static Intent intentForDeepLinkMethod1147(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1148/{param1}") public static Intent intentForDeepLinkMethod1148(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1149/{param1}") public static Intent intentForDeepLinkMethod1149(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1150/{param1}") public static Intent intentForDeepLinkMethod1150(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1151/{param1}") public static Intent intentForDeepLinkMethod1151(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1152/{param1}") public static Intent intentForDeepLinkMethod1152(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1153/{param1}") public static Intent intentForDeepLinkMethod1153(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1154/{param1}") public static Intent intentForDeepLinkMethod1154(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1155/{param1}") public static Intent intentForDeepLinkMethod1155(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1156/{param1}") public static Intent intentForDeepLinkMethod1156(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1157/{param1}") public static Intent intentForDeepLinkMethod1157(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1158/{param1}") public static Intent intentForDeepLinkMethod1158(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1159/{param1}") public static Intent intentForDeepLinkMethod1159(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1160/{param1}") public static Intent intentForDeepLinkMethod1160(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1161/{param1}") public static Intent intentForDeepLinkMethod1161(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1162/{param1}") public static Intent intentForDeepLinkMethod1162(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1163/{param1}") public static Intent intentForDeepLinkMethod1163(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1164/{param1}") public static Intent intentForDeepLinkMethod1164(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1165/{param1}") public static Intent intentForDeepLinkMethod1165(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1166/{param1}") public static Intent intentForDeepLinkMethod1166(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1167/{param1}") public static Intent intentForDeepLinkMethod1167(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1168/{param1}") public static Intent intentForDeepLinkMethod1168(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1169/{param1}") public static Intent intentForDeepLinkMethod1169(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1170/{param1}") public static Intent intentForDeepLinkMethod1170(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1171/{param1}") public static Intent intentForDeepLinkMethod1171(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1172/{param1}") public static Intent intentForDeepLinkMethod1172(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1173/{param1}") public static Intent intentForDeepLinkMethod1173(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1174/{param1}") public static Intent intentForDeepLinkMethod1174(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1175/{param1}") public static Intent intentForDeepLinkMethod1175(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1176/{param1}") public static Intent intentForDeepLinkMethod1176(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1177/{param1}") public static Intent intentForDeepLinkMethod1177(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1178/{param1}") public static Intent intentForDeepLinkMethod1178(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1179/{param1}") public static Intent intentForDeepLinkMethod1179(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1180/{param1}") public static Intent intentForDeepLinkMethod1180(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1181/{param1}") public static Intent intentForDeepLinkMethod1181(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1182/{param1}") public static Intent intentForDeepLinkMethod1182(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1183/{param1}") public static Intent intentForDeepLinkMethod1183(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1184/{param1}") public static Intent intentForDeepLinkMethod1184(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1185/{param1}") public static Intent intentForDeepLinkMethod1185(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1186/{param1}") public static Intent intentForDeepLinkMethod1186(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1187/{param1}") public static Intent intentForDeepLinkMethod1187(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1188/{param1}") public static Intent intentForDeepLinkMethod1188(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1189/{param1}") public static Intent intentForDeepLinkMethod1189(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1190/{param1}") public static Intent intentForDeepLinkMethod1190(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1191/{param1}") public static Intent intentForDeepLinkMethod1191(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1192/{param1}") public static Intent intentForDeepLinkMethod1192(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1193/{param1}") public static Intent intentForDeepLinkMethod1193(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1194/{param1}") public static Intent intentForDeepLinkMethod1194(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1195/{param1}") public static Intent intentForDeepLinkMethod1195(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1196/{param1}") public static Intent intentForDeepLinkMethod1196(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1197/{param1}") public static Intent intentForDeepLinkMethod1197(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1198/{param1}") public static Intent intentForDeepLinkMethod1198(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1199/{param1}") public static Intent intentForDeepLinkMethod1199(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1200/{param1}") public static Intent intentForDeepLinkMethod1200(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1201/{param1}") public static Intent intentForDeepLinkMethod1201(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1202/{param1}") public static Intent intentForDeepLinkMethod1202(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1203/{param1}") public static Intent intentForDeepLinkMethod1203(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1204/{param1}") public static Intent intentForDeepLinkMethod1204(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1205/{param1}") public static Intent intentForDeepLinkMethod1205(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1206/{param1}") public static Intent intentForDeepLinkMethod1206(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1207/{param1}") public static Intent intentForDeepLinkMethod1207(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1208/{param1}") public static Intent intentForDeepLinkMethod1208(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1209/{param1}") public static Intent intentForDeepLinkMethod1209(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1210/{param1}") public static Intent intentForDeepLinkMethod1210(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1211/{param1}") public static Intent intentForDeepLinkMethod1211(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1212/{param1}") public static Intent intentForDeepLinkMethod1212(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1213/{param1}") public static Intent intentForDeepLinkMethod1213(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1214/{param1}") public static Intent intentForDeepLinkMethod1214(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1215/{param1}") public static Intent intentForDeepLinkMethod1215(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1216/{param1}") public static Intent intentForDeepLinkMethod1216(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1217/{param1}") public static Intent intentForDeepLinkMethod1217(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1218/{param1}") public static Intent intentForDeepLinkMethod1218(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1219/{param1}") public static Intent intentForDeepLinkMethod1219(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1220/{param1}") public static Intent intentForDeepLinkMethod1220(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1221/{param1}") public static Intent intentForDeepLinkMethod1221(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1222/{param1}") public static Intent intentForDeepLinkMethod1222(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1223/{param1}") public static Intent intentForDeepLinkMethod1223(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1224/{param1}") public static Intent intentForDeepLinkMethod1224(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1225/{param1}") public static Intent intentForDeepLinkMethod1225(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1226/{param1}") public static Intent intentForDeepLinkMethod1226(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1227/{param1}") public static Intent intentForDeepLinkMethod1227(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1228/{param1}") public static Intent intentForDeepLinkMethod1228(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1229/{param1}") public static Intent intentForDeepLinkMethod1229(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1230/{param1}") public static Intent intentForDeepLinkMethod1230(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1231/{param1}") public static Intent intentForDeepLinkMethod1231(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1232/{param1}") public static Intent intentForDeepLinkMethod1232(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1233/{param1}") public static Intent intentForDeepLinkMethod1233(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1234/{param1}") public static Intent intentForDeepLinkMethod1234(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1235/{param1}") public static Intent intentForDeepLinkMethod1235(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1236/{param1}") public static Intent intentForDeepLinkMethod1236(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1237/{param1}") public static Intent intentForDeepLinkMethod1237(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1238/{param1}") public static Intent intentForDeepLinkMethod1238(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1239/{param1}") public static Intent intentForDeepLinkMethod1239(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1240/{param1}") public static Intent intentForDeepLinkMethod1240(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1241/{param1}") public static Intent intentForDeepLinkMethod1241(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1242/{param1}") public static Intent intentForDeepLinkMethod1242(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1243/{param1}") public static Intent intentForDeepLinkMethod1243(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1244/{param1}") public static Intent intentForDeepLinkMethod1244(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1245/{param1}") public static Intent intentForDeepLinkMethod1245(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1246/{param1}") public static Intent intentForDeepLinkMethod1246(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1247/{param1}") public static Intent intentForDeepLinkMethod1247(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1248/{param1}") public static Intent intentForDeepLinkMethod1248(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1249/{param1}") public static Intent intentForDeepLinkMethod1249(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1250/{param1}") public static Intent intentForDeepLinkMethod1250(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1251/{param1}") public static Intent intentForDeepLinkMethod1251(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1252/{param1}") public static Intent intentForDeepLinkMethod1252(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1253/{param1}") public static Intent intentForDeepLinkMethod1253(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1254/{param1}") public static Intent intentForDeepLinkMethod1254(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1255/{param1}") public static Intent intentForDeepLinkMethod1255(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1256/{param1}") public static Intent intentForDeepLinkMethod1256(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1257/{param1}") public static Intent intentForDeepLinkMethod1257(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1258/{param1}") public static Intent intentForDeepLinkMethod1258(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1259/{param1}") public static Intent intentForDeepLinkMethod1259(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1260/{param1}") public static Intent intentForDeepLinkMethod1260(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1261/{param1}") public static Intent intentForDeepLinkMethod1261(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1262/{param1}") public static Intent intentForDeepLinkMethod1262(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1263/{param1}") public static Intent intentForDeepLinkMethod1263(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1264/{param1}") public static Intent intentForDeepLinkMethod1264(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1265/{param1}") public static Intent intentForDeepLinkMethod1265(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1266/{param1}") public static Intent intentForDeepLinkMethod1266(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1267/{param1}") public static Intent intentForDeepLinkMethod1267(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1268/{param1}") public static Intent intentForDeepLinkMethod1268(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1269/{param1}") public static Intent intentForDeepLinkMethod1269(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1270/{param1}") public static Intent intentForDeepLinkMethod1270(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1271/{param1}") public static Intent intentForDeepLinkMethod1271(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1272/{param1}") public static Intent intentForDeepLinkMethod1272(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1273/{param1}") public static Intent intentForDeepLinkMethod1273(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1274/{param1}") public static Intent intentForDeepLinkMethod1274(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1275/{param1}") public static Intent intentForDeepLinkMethod1275(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1276/{param1}") public static Intent intentForDeepLinkMethod1276(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1277/{param1}") public static Intent intentForDeepLinkMethod1277(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1278/{param1}") public static Intent intentForDeepLinkMethod1278(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1279/{param1}") public static Intent intentForDeepLinkMethod1279(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1280/{param1}") public static Intent intentForDeepLinkMethod1280(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1281/{param1}") public static Intent intentForDeepLinkMethod1281(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1282/{param1}") public static Intent intentForDeepLinkMethod1282(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1283/{param1}") public static Intent intentForDeepLinkMethod1283(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1284/{param1}") public static Intent intentForDeepLinkMethod1284(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1285/{param1}") public static Intent intentForDeepLinkMethod1285(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1286/{param1}") public static Intent intentForDeepLinkMethod1286(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1287/{param1}") public static Intent intentForDeepLinkMethod1287(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1288/{param1}") public static Intent intentForDeepLinkMethod1288(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1289/{param1}") public static Intent intentForDeepLinkMethod1289(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1290/{param1}") public static Intent intentForDeepLinkMethod1290(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1291/{param1}") public static Intent intentForDeepLinkMethod1291(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1292/{param1}") public static Intent intentForDeepLinkMethod1292(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1293/{param1}") public static Intent intentForDeepLinkMethod1293(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1294/{param1}") public static Intent intentForDeepLinkMethod1294(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1295/{param1}") public static Intent intentForDeepLinkMethod1295(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1296/{param1}") public static Intent intentForDeepLinkMethod1296(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1297/{param1}") public static Intent intentForDeepLinkMethod1297(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1298/{param1}") public static Intent intentForDeepLinkMethod1298(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1299/{param1}") public static Intent intentForDeepLinkMethod1299(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1300/{param1}") public static Intent intentForDeepLinkMethod1300(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1301/{param1}") public static Intent intentForDeepLinkMethod1301(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1302/{param1}") public static Intent intentForDeepLinkMethod1302(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1303/{param1}") public static Intent intentForDeepLinkMethod1303(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1304/{param1}") public static Intent intentForDeepLinkMethod1304(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1305/{param1}") public static Intent intentForDeepLinkMethod1305(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1306/{param1}") public static Intent intentForDeepLinkMethod1306(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1307/{param1}") public static Intent intentForDeepLinkMethod1307(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1308/{param1}") public static Intent intentForDeepLinkMethod1308(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1309/{param1}") public static Intent intentForDeepLinkMethod1309(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1310/{param1}") public static Intent intentForDeepLinkMethod1310(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1311/{param1}") public static Intent intentForDeepLinkMethod1311(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1312/{param1}") public static Intent intentForDeepLinkMethod1312(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1313/{param1}") public static Intent intentForDeepLinkMethod1313(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1314/{param1}") public static Intent intentForDeepLinkMethod1314(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1315/{param1}") public static Intent intentForDeepLinkMethod1315(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1316/{param1}") public static Intent intentForDeepLinkMethod1316(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1317/{param1}") public static Intent intentForDeepLinkMethod1317(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1318/{param1}") public static Intent intentForDeepLinkMethod1318(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1319/{param1}") public static Intent intentForDeepLinkMethod1319(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1320/{param1}") public static Intent intentForDeepLinkMethod1320(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1321/{param1}") public static Intent intentForDeepLinkMethod1321(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1322/{param1}") public static Intent intentForDeepLinkMethod1322(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1323/{param1}") public static Intent intentForDeepLinkMethod1323(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1324/{param1}") public static Intent intentForDeepLinkMethod1324(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1325/{param1}") public static Intent intentForDeepLinkMethod1325(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1326/{param1}") public static Intent intentForDeepLinkMethod1326(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1327/{param1}") public static Intent intentForDeepLinkMethod1327(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1328/{param1}") public static Intent intentForDeepLinkMethod1328(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1329/{param1}") public static Intent intentForDeepLinkMethod1329(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1330/{param1}") public static Intent intentForDeepLinkMethod1330(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1331/{param1}") public static Intent intentForDeepLinkMethod1331(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1332/{param1}") public static Intent intentForDeepLinkMethod1332(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1333/{param1}") public static Intent intentForDeepLinkMethod1333(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1334/{param1}") public static Intent intentForDeepLinkMethod1334(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1335/{param1}") public static Intent intentForDeepLinkMethod1335(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1336/{param1}") public static Intent intentForDeepLinkMethod1336(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1337/{param1}") public static Intent intentForDeepLinkMethod1337(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1338/{param1}") public static Intent intentForDeepLinkMethod1338(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1339/{param1}") public static Intent intentForDeepLinkMethod1339(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1340/{param1}") public static Intent intentForDeepLinkMethod1340(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1341/{param1}") public static Intent intentForDeepLinkMethod1341(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1342/{param1}") public static Intent intentForDeepLinkMethod1342(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1343/{param1}") public static Intent intentForDeepLinkMethod1343(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1344/{param1}") public static Intent intentForDeepLinkMethod1344(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1345/{param1}") public static Intent intentForDeepLinkMethod1345(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1346/{param1}") public static Intent intentForDeepLinkMethod1346(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1347/{param1}") public static Intent intentForDeepLinkMethod1347(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1348/{param1}") public static Intent intentForDeepLinkMethod1348(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1349/{param1}") public static Intent intentForDeepLinkMethod1349(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1350/{param1}") public static Intent intentForDeepLinkMethod1350(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1351/{param1}") public static Intent intentForDeepLinkMethod1351(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1352/{param1}") public static Intent intentForDeepLinkMethod1352(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1353/{param1}") public static Intent intentForDeepLinkMethod1353(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1354/{param1}") public static Intent intentForDeepLinkMethod1354(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1355/{param1}") public static Intent intentForDeepLinkMethod1355(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1356/{param1}") public static Intent intentForDeepLinkMethod1356(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1357/{param1}") public static Intent intentForDeepLinkMethod1357(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1358/{param1}") public static Intent intentForDeepLinkMethod1358(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1359/{param1}") public static Intent intentForDeepLinkMethod1359(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1360/{param1}") public static Intent intentForDeepLinkMethod1360(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1361/{param1}") public static Intent intentForDeepLinkMethod1361(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1362/{param1}") public static Intent intentForDeepLinkMethod1362(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1363/{param1}") public static Intent intentForDeepLinkMethod1363(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1364/{param1}") public static Intent intentForDeepLinkMethod1364(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1365/{param1}") public static Intent intentForDeepLinkMethod1365(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1366/{param1}") public static Intent intentForDeepLinkMethod1366(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1367/{param1}") public static Intent intentForDeepLinkMethod1367(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1368/{param1}") public static Intent intentForDeepLinkMethod1368(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1369/{param1}") public static Intent intentForDeepLinkMethod1369(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1370/{param1}") public static Intent intentForDeepLinkMethod1370(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1371/{param1}") public static Intent intentForDeepLinkMethod1371(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1372/{param1}") public static Intent intentForDeepLinkMethod1372(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1373/{param1}") public static Intent intentForDeepLinkMethod1373(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1374/{param1}") public static Intent intentForDeepLinkMethod1374(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1375/{param1}") public static Intent intentForDeepLinkMethod1375(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1376/{param1}") public static Intent intentForDeepLinkMethod1376(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1377/{param1}") public static Intent intentForDeepLinkMethod1377(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1378/{param1}") public static Intent intentForDeepLinkMethod1378(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1379/{param1}") public static Intent intentForDeepLinkMethod1379(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1380/{param1}") public static Intent intentForDeepLinkMethod1380(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1381/{param1}") public static Intent intentForDeepLinkMethod1381(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1382/{param1}") public static Intent intentForDeepLinkMethod1382(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1383/{param1}") public static Intent intentForDeepLinkMethod1383(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1384/{param1}") public static Intent intentForDeepLinkMethod1384(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1385/{param1}") public static Intent intentForDeepLinkMethod1385(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1386/{param1}") public static Intent intentForDeepLinkMethod1386(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1387/{param1}") public static Intent intentForDeepLinkMethod1387(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1388/{param1}") public static Intent intentForDeepLinkMethod1388(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1389/{param1}") public static Intent intentForDeepLinkMethod1389(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1390/{param1}") public static Intent intentForDeepLinkMethod1390(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1391/{param1}") public static Intent intentForDeepLinkMethod1391(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1392/{param1}") public static Intent intentForDeepLinkMethod1392(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1393/{param1}") public static Intent intentForDeepLinkMethod1393(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1394/{param1}") public static Intent intentForDeepLinkMethod1394(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1395/{param1}") public static Intent intentForDeepLinkMethod1395(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1396/{param1}") public static Intent intentForDeepLinkMethod1396(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1397/{param1}") public static Intent intentForDeepLinkMethod1397(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1398/{param1}") public static Intent intentForDeepLinkMethod1398(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1399/{param1}") public static Intent intentForDeepLinkMethod1399(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1400/{param1}") public static Intent intentForDeepLinkMethod1400(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1401/{param1}") public static Intent intentForDeepLinkMethod1401(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1402/{param1}") public static Intent intentForDeepLinkMethod1402(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1403/{param1}") public static Intent intentForDeepLinkMethod1403(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1404/{param1}") public static Intent intentForDeepLinkMethod1404(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1405/{param1}") public static Intent intentForDeepLinkMethod1405(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1406/{param1}") public static Intent intentForDeepLinkMethod1406(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1407/{param1}") public static Intent intentForDeepLinkMethod1407(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1408/{param1}") public static Intent intentForDeepLinkMethod1408(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1409/{param1}") public static Intent intentForDeepLinkMethod1409(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1410/{param1}") public static Intent intentForDeepLinkMethod1410(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1411/{param1}") public static Intent intentForDeepLinkMethod1411(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1412/{param1}") public static Intent intentForDeepLinkMethod1412(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1413/{param1}") public static Intent intentForDeepLinkMethod1413(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1414/{param1}") public static Intent intentForDeepLinkMethod1414(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1415/{param1}") public static Intent intentForDeepLinkMethod1415(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1416/{param1}") public static Intent intentForDeepLinkMethod1416(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1417/{param1}") public static Intent intentForDeepLinkMethod1417(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1418/{param1}") public static Intent intentForDeepLinkMethod1418(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1419/{param1}") public static Intent intentForDeepLinkMethod1419(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1420/{param1}") public static Intent intentForDeepLinkMethod1420(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1421/{param1}") public static Intent intentForDeepLinkMethod1421(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1422/{param1}") public static Intent intentForDeepLinkMethod1422(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1423/{param1}") public static Intent intentForDeepLinkMethod1423(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1424/{param1}") public static Intent intentForDeepLinkMethod1424(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1425/{param1}") public static Intent intentForDeepLinkMethod1425(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1426/{param1}") public static Intent intentForDeepLinkMethod1426(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1427/{param1}") public static Intent intentForDeepLinkMethod1427(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1428/{param1}") public static Intent intentForDeepLinkMethod1428(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1429/{param1}") public static Intent intentForDeepLinkMethod1429(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1430/{param1}") public static Intent intentForDeepLinkMethod1430(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1431/{param1}") public static Intent intentForDeepLinkMethod1431(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1432/{param1}") public static Intent intentForDeepLinkMethod1432(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1433/{param1}") public static Intent intentForDeepLinkMethod1433(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1434/{param1}") public static Intent intentForDeepLinkMethod1434(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1435/{param1}") public static Intent intentForDeepLinkMethod1435(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1436/{param1}") public static Intent intentForDeepLinkMethod1436(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1437/{param1}") public static Intent intentForDeepLinkMethod1437(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1438/{param1}") public static Intent intentForDeepLinkMethod1438(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1439/{param1}") public static Intent intentForDeepLinkMethod1439(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1440/{param1}") public static Intent intentForDeepLinkMethod1440(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1441/{param1}") public static Intent intentForDeepLinkMethod1441(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1442/{param1}") public static Intent intentForDeepLinkMethod1442(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1443/{param1}") public static Intent intentForDeepLinkMethod1443(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1444/{param1}") public static Intent intentForDeepLinkMethod1444(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1445/{param1}") public static Intent intentForDeepLinkMethod1445(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1446/{param1}") public static Intent intentForDeepLinkMethod1446(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1447/{param1}") public static Intent intentForDeepLinkMethod1447(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1448/{param1}") public static Intent intentForDeepLinkMethod1448(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1449/{param1}") public static Intent intentForDeepLinkMethod1449(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1450/{param1}") public static Intent intentForDeepLinkMethod1450(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1451/{param1}") public static Intent intentForDeepLinkMethod1451(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1452/{param1}") public static Intent intentForDeepLinkMethod1452(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1453/{param1}") public static Intent intentForDeepLinkMethod1453(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1454/{param1}") public static Intent intentForDeepLinkMethod1454(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1455/{param1}") public static Intent intentForDeepLinkMethod1455(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1456/{param1}") public static Intent intentForDeepLinkMethod1456(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1457/{param1}") public static Intent intentForDeepLinkMethod1457(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1458/{param1}") public static Intent intentForDeepLinkMethod1458(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1459/{param1}") public static Intent intentForDeepLinkMethod1459(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1460/{param1}") public static Intent intentForDeepLinkMethod1460(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1461/{param1}") public static Intent intentForDeepLinkMethod1461(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1462/{param1}") public static Intent intentForDeepLinkMethod1462(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1463/{param1}") public static Intent intentForDeepLinkMethod1463(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1464/{param1}") public static Intent intentForDeepLinkMethod1464(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1465/{param1}") public static Intent intentForDeepLinkMethod1465(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1466/{param1}") public static Intent intentForDeepLinkMethod1466(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1467/{param1}") public static Intent intentForDeepLinkMethod1467(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1468/{param1}") public static Intent intentForDeepLinkMethod1468(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1469/{param1}") public static Intent intentForDeepLinkMethod1469(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1470/{param1}") public static Intent intentForDeepLinkMethod1470(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1471/{param1}") public static Intent intentForDeepLinkMethod1471(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1472/{param1}") public static Intent intentForDeepLinkMethod1472(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1473/{param1}") public static Intent intentForDeepLinkMethod1473(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1474/{param1}") public static Intent intentForDeepLinkMethod1474(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1475/{param1}") public static Intent intentForDeepLinkMethod1475(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1476/{param1}") public static Intent intentForDeepLinkMethod1476(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1477/{param1}") public static Intent intentForDeepLinkMethod1477(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1478/{param1}") public static Intent intentForDeepLinkMethod1478(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1479/{param1}") public static Intent intentForDeepLinkMethod1479(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1480/{param1}") public static Intent intentForDeepLinkMethod1480(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1481/{param1}") public static Intent intentForDeepLinkMethod1481(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1482/{param1}") public static Intent intentForDeepLinkMethod1482(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1483/{param1}") public static Intent intentForDeepLinkMethod1483(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1484/{param1}") public static Intent intentForDeepLinkMethod1484(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1485/{param1}") public static Intent intentForDeepLinkMethod1485(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1486/{param1}") public static Intent intentForDeepLinkMethod1486(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1487/{param1}") public static Intent intentForDeepLinkMethod1487(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1488/{param1}") public static Intent intentForDeepLinkMethod1488(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1489/{param1}") public static Intent intentForDeepLinkMethod1489(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1490/{param1}") public static Intent intentForDeepLinkMethod1490(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1491/{param1}") public static Intent intentForDeepLinkMethod1491(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1492/{param1}") public static Intent intentForDeepLinkMethod1492(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1493/{param1}") public static Intent intentForDeepLinkMethod1493(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1494/{param1}") public static Intent intentForDeepLinkMethod1494(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1495/{param1}") public static Intent intentForDeepLinkMethod1495(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1496/{param1}") public static Intent intentForDeepLinkMethod1496(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1497/{param1}") public static Intent intentForDeepLinkMethod1497(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1498/{param1}") public static Intent intentForDeepLinkMethod1498(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1499/{param1}") public static Intent intentForDeepLinkMethod1499(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1500/{param1}") public static Intent intentForDeepLinkMethod1500(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1501/{param1}") public static Intent intentForDeepLinkMethod1501(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1502/{param1}") public static Intent intentForDeepLinkMethod1502(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1503/{param1}") public static Intent intentForDeepLinkMethod1503(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1504/{param1}") public static Intent intentForDeepLinkMethod1504(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1505/{param1}") public static Intent intentForDeepLinkMethod1505(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1506/{param1}") public static Intent intentForDeepLinkMethod1506(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1507/{param1}") public static Intent intentForDeepLinkMethod1507(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1508/{param1}") public static Intent intentForDeepLinkMethod1508(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1509/{param1}") public static Intent intentForDeepLinkMethod1509(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1510/{param1}") public static Intent intentForDeepLinkMethod1510(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1511/{param1}") public static Intent intentForDeepLinkMethod1511(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1512/{param1}") public static Intent intentForDeepLinkMethod1512(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1513/{param1}") public static Intent intentForDeepLinkMethod1513(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1514/{param1}") public static Intent intentForDeepLinkMethod1514(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1515/{param1}") public static Intent intentForDeepLinkMethod1515(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1516/{param1}") public static Intent intentForDeepLinkMethod1516(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1517/{param1}") public static Intent intentForDeepLinkMethod1517(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1518/{param1}") public static Intent intentForDeepLinkMethod1518(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1519/{param1}") public static Intent intentForDeepLinkMethod1519(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1520/{param1}") public static Intent intentForDeepLinkMethod1520(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1521/{param1}") public static Intent intentForDeepLinkMethod1521(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1522/{param1}") public static Intent intentForDeepLinkMethod1522(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1523/{param1}") public static Intent intentForDeepLinkMethod1523(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1524/{param1}") public static Intent intentForDeepLinkMethod1524(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1525/{param1}") public static Intent intentForDeepLinkMethod1525(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1526/{param1}") public static Intent intentForDeepLinkMethod1526(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1527/{param1}") public static Intent intentForDeepLinkMethod1527(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1528/{param1}") public static Intent intentForDeepLinkMethod1528(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1529/{param1}") public static Intent intentForDeepLinkMethod1529(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1530/{param1}") public static Intent intentForDeepLinkMethod1530(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1531/{param1}") public static Intent intentForDeepLinkMethod1531(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1532/{param1}") public static Intent intentForDeepLinkMethod1532(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1533/{param1}") public static Intent intentForDeepLinkMethod1533(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1534/{param1}") public static Intent intentForDeepLinkMethod1534(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1535/{param1}") public static Intent intentForDeepLinkMethod1535(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1536/{param1}") public static Intent intentForDeepLinkMethod1536(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1537/{param1}") public static Intent intentForDeepLinkMethod1537(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1538/{param1}") public static Intent intentForDeepLinkMethod1538(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1539/{param1}") public static Intent intentForDeepLinkMethod1539(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1540/{param1}") public static Intent intentForDeepLinkMethod1540(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1541/{param1}") public static Intent intentForDeepLinkMethod1541(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1542/{param1}") public static Intent intentForDeepLinkMethod1542(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1543/{param1}") public static Intent intentForDeepLinkMethod1543(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1544/{param1}") public static Intent intentForDeepLinkMethod1544(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1545/{param1}") public static Intent intentForDeepLinkMethod1545(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1546/{param1}") public static Intent intentForDeepLinkMethod1546(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1547/{param1}") public static Intent intentForDeepLinkMethod1547(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1548/{param1}") public static Intent intentForDeepLinkMethod1548(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1549/{param1}") public static Intent intentForDeepLinkMethod1549(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1550/{param1}") public static Intent intentForDeepLinkMethod1550(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1551/{param1}") public static Intent intentForDeepLinkMethod1551(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1552/{param1}") public static Intent intentForDeepLinkMethod1552(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1553/{param1}") public static Intent intentForDeepLinkMethod1553(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1554/{param1}") public static Intent intentForDeepLinkMethod1554(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1555/{param1}") public static Intent intentForDeepLinkMethod1555(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1556/{param1}") public static Intent intentForDeepLinkMethod1556(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1557/{param1}") public static Intent intentForDeepLinkMethod1557(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1558/{param1}") public static Intent intentForDeepLinkMethod1558(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1559/{param1}") public static Intent intentForDeepLinkMethod1559(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1560/{param1}") public static Intent intentForDeepLinkMethod1560(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1561/{param1}") public static Intent intentForDeepLinkMethod1561(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1562/{param1}") public static Intent intentForDeepLinkMethod1562(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1563/{param1}") public static Intent intentForDeepLinkMethod1563(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1564/{param1}") public static Intent intentForDeepLinkMethod1564(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1565/{param1}") public static Intent intentForDeepLinkMethod1565(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1566/{param1}") public static Intent intentForDeepLinkMethod1566(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1567/{param1}") public static Intent intentForDeepLinkMethod1567(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1568/{param1}") public static Intent intentForDeepLinkMethod1568(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1569/{param1}") public static Intent intentForDeepLinkMethod1569(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1570/{param1}") public static Intent intentForDeepLinkMethod1570(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1571/{param1}") public static Intent intentForDeepLinkMethod1571(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1572/{param1}") public static Intent intentForDeepLinkMethod1572(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1573/{param1}") public static Intent intentForDeepLinkMethod1573(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1574/{param1}") public static Intent intentForDeepLinkMethod1574(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1575/{param1}") public static Intent intentForDeepLinkMethod1575(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1576/{param1}") public static Intent intentForDeepLinkMethod1576(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1577/{param1}") public static Intent intentForDeepLinkMethod1577(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1578/{param1}") public static Intent intentForDeepLinkMethod1578(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1579/{param1}") public static Intent intentForDeepLinkMethod1579(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1580/{param1}") public static Intent intentForDeepLinkMethod1580(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1581/{param1}") public static Intent intentForDeepLinkMethod1581(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1582/{param1}") public static Intent intentForDeepLinkMethod1582(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1583/{param1}") public static Intent intentForDeepLinkMethod1583(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1584/{param1}") public static Intent intentForDeepLinkMethod1584(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1585/{param1}") public static Intent intentForDeepLinkMethod1585(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1586/{param1}") public static Intent intentForDeepLinkMethod1586(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1587/{param1}") public static Intent intentForDeepLinkMethod1587(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1588/{param1}") public static Intent intentForDeepLinkMethod1588(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1589/{param1}") public static Intent intentForDeepLinkMethod1589(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1590/{param1}") public static Intent intentForDeepLinkMethod1590(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1591/{param1}") public static Intent intentForDeepLinkMethod1591(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1592/{param1}") public static Intent intentForDeepLinkMethod1592(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1593/{param1}") public static Intent intentForDeepLinkMethod1593(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1594/{param1}") public static Intent intentForDeepLinkMethod1594(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1595/{param1}") public static Intent intentForDeepLinkMethod1595(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1596/{param1}") public static Intent intentForDeepLinkMethod1596(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1597/{param1}") public static Intent intentForDeepLinkMethod1597(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1598/{param1}") public static Intent intentForDeepLinkMethod1598(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1599/{param1}") public static Intent intentForDeepLinkMethod1599(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1600/{param1}") public static Intent intentForDeepLinkMethod1600(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1601/{param1}") public static Intent intentForDeepLinkMethod1601(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1602/{param1}") public static Intent intentForDeepLinkMethod1602(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1603/{param1}") public static Intent intentForDeepLinkMethod1603(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1604/{param1}") public static Intent intentForDeepLinkMethod1604(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1605/{param1}") public static Intent intentForDeepLinkMethod1605(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1606/{param1}") public static Intent intentForDeepLinkMethod1606(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1607/{param1}") public static Intent intentForDeepLinkMethod1607(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1608/{param1}") public static Intent intentForDeepLinkMethod1608(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1609/{param1}") public static Intent intentForDeepLinkMethod1609(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1610/{param1}") public static Intent intentForDeepLinkMethod1610(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1611/{param1}") public static Intent intentForDeepLinkMethod1611(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1612/{param1}") public static Intent intentForDeepLinkMethod1612(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1613/{param1}") public static Intent intentForDeepLinkMethod1613(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1614/{param1}") public static Intent intentForDeepLinkMethod1614(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1615/{param1}") public static Intent intentForDeepLinkMethod1615(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1616/{param1}") public static Intent intentForDeepLinkMethod1616(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1617/{param1}") public static Intent intentForDeepLinkMethod1617(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1618/{param1}") public static Intent intentForDeepLinkMethod1618(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1619/{param1}") public static Intent intentForDeepLinkMethod1619(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1620/{param1}") public static Intent intentForDeepLinkMethod1620(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1621/{param1}") public static Intent intentForDeepLinkMethod1621(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1622/{param1}") public static Intent intentForDeepLinkMethod1622(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1623/{param1}") public static Intent intentForDeepLinkMethod1623(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1624/{param1}") public static Intent intentForDeepLinkMethod1624(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1625/{param1}") public static Intent intentForDeepLinkMethod1625(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1626/{param1}") public static Intent intentForDeepLinkMethod1626(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1627/{param1}") public static Intent intentForDeepLinkMethod1627(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1628/{param1}") public static Intent intentForDeepLinkMethod1628(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1629/{param1}") public static Intent intentForDeepLinkMethod1629(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1630/{param1}") public static Intent intentForDeepLinkMethod1630(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1631/{param1}") public static Intent intentForDeepLinkMethod1631(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1632/{param1}") public static Intent intentForDeepLinkMethod1632(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1633/{param1}") public static Intent intentForDeepLinkMethod1633(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1634/{param1}") public static Intent intentForDeepLinkMethod1634(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1635/{param1}") public static Intent intentForDeepLinkMethod1635(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1636/{param1}") public static Intent intentForDeepLinkMethod1636(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1637/{param1}") public static Intent intentForDeepLinkMethod1637(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1638/{param1}") public static Intent intentForDeepLinkMethod1638(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1639/{param1}") public static Intent intentForDeepLinkMethod1639(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1640/{param1}") public static Intent intentForDeepLinkMethod1640(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1641/{param1}") public static Intent intentForDeepLinkMethod1641(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1642/{param1}") public static Intent intentForDeepLinkMethod1642(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1643/{param1}") public static Intent intentForDeepLinkMethod1643(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1644/{param1}") public static Intent intentForDeepLinkMethod1644(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1645/{param1}") public static Intent intentForDeepLinkMethod1645(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1646/{param1}") public static Intent intentForDeepLinkMethod1646(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1647/{param1}") public static Intent intentForDeepLinkMethod1647(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1648/{param1}") public static Intent intentForDeepLinkMethod1648(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1649/{param1}") public static Intent intentForDeepLinkMethod1649(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1650/{param1}") public static Intent intentForDeepLinkMethod1650(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1651/{param1}") public static Intent intentForDeepLinkMethod1651(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1652/{param1}") public static Intent intentForDeepLinkMethod1652(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1653/{param1}") public static Intent intentForDeepLinkMethod1653(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1654/{param1}") public static Intent intentForDeepLinkMethod1654(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1655/{param1}") public static Intent intentForDeepLinkMethod1655(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1656/{param1}") public static Intent intentForDeepLinkMethod1656(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1657/{param1}") public static Intent intentForDeepLinkMethod1657(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1658/{param1}") public static Intent intentForDeepLinkMethod1658(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1659/{param1}") public static Intent intentForDeepLinkMethod1659(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1660/{param1}") public static Intent intentForDeepLinkMethod1660(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1661/{param1}") public static Intent intentForDeepLinkMethod1661(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1662/{param1}") public static Intent intentForDeepLinkMethod1662(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1663/{param1}") public static Intent intentForDeepLinkMethod1663(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1664/{param1}") public static Intent intentForDeepLinkMethod1664(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1665/{param1}") public static Intent intentForDeepLinkMethod1665(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1666/{param1}") public static Intent intentForDeepLinkMethod1666(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1667/{param1}") public static Intent intentForDeepLinkMethod1667(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1668/{param1}") public static Intent intentForDeepLinkMethod1668(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1669/{param1}") public static Intent intentForDeepLinkMethod1669(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1670/{param1}") public static Intent intentForDeepLinkMethod1670(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1671/{param1}") public static Intent intentForDeepLinkMethod1671(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1672/{param1}") public static Intent intentForDeepLinkMethod1672(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1673/{param1}") public static Intent intentForDeepLinkMethod1673(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1674/{param1}") public static Intent intentForDeepLinkMethod1674(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1675/{param1}") public static Intent intentForDeepLinkMethod1675(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1676/{param1}") public static Intent intentForDeepLinkMethod1676(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1677/{param1}") public static Intent intentForDeepLinkMethod1677(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1678/{param1}") public static Intent intentForDeepLinkMethod1678(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1679/{param1}") public static Intent intentForDeepLinkMethod1679(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1680/{param1}") public static Intent intentForDeepLinkMethod1680(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1681/{param1}") public static Intent intentForDeepLinkMethod1681(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1682/{param1}") public static Intent intentForDeepLinkMethod1682(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1683/{param1}") public static Intent intentForDeepLinkMethod1683(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1684/{param1}") public static Intent intentForDeepLinkMethod1684(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1685/{param1}") public static Intent intentForDeepLinkMethod1685(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1686/{param1}") public static Intent intentForDeepLinkMethod1686(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1687/{param1}") public static Intent intentForDeepLinkMethod1687(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1688/{param1}") public static Intent intentForDeepLinkMethod1688(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1689/{param1}") public static Intent intentForDeepLinkMethod1689(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1690/{param1}") public static Intent intentForDeepLinkMethod1690(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1691/{param1}") public static Intent intentForDeepLinkMethod1691(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1692/{param1}") public static Intent intentForDeepLinkMethod1692(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1693/{param1}") public static Intent intentForDeepLinkMethod1693(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1694/{param1}") public static Intent intentForDeepLinkMethod1694(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1695/{param1}") public static Intent intentForDeepLinkMethod1695(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1696/{param1}") public static Intent intentForDeepLinkMethod1696(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1697/{param1}") public static Intent intentForDeepLinkMethod1697(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1698/{param1}") public static Intent intentForDeepLinkMethod1698(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1699/{param1}") public static Intent intentForDeepLinkMethod1699(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1700/{param1}") public static Intent intentForDeepLinkMethod1700(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1701/{param1}") public static Intent intentForDeepLinkMethod1701(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1702/{param1}") public static Intent intentForDeepLinkMethod1702(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1703/{param1}") public static Intent intentForDeepLinkMethod1703(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1704/{param1}") public static Intent intentForDeepLinkMethod1704(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1705/{param1}") public static Intent intentForDeepLinkMethod1705(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1706/{param1}") public static Intent intentForDeepLinkMethod1706(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1707/{param1}") public static Intent intentForDeepLinkMethod1707(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1708/{param1}") public static Intent intentForDeepLinkMethod1708(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1709/{param1}") public static Intent intentForDeepLinkMethod1709(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1710/{param1}") public static Intent intentForDeepLinkMethod1710(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1711/{param1}") public static Intent intentForDeepLinkMethod1711(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1712/{param1}") public static Intent intentForDeepLinkMethod1712(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1713/{param1}") public static Intent intentForDeepLinkMethod1713(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1714/{param1}") public static Intent intentForDeepLinkMethod1714(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1715/{param1}") public static Intent intentForDeepLinkMethod1715(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1716/{param1}") public static Intent intentForDeepLinkMethod1716(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1717/{param1}") public static Intent intentForDeepLinkMethod1717(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1718/{param1}") public static Intent intentForDeepLinkMethod1718(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1719/{param1}") public static Intent intentForDeepLinkMethod1719(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1720/{param1}") public static Intent intentForDeepLinkMethod1720(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1721/{param1}") public static Intent intentForDeepLinkMethod1721(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1722/{param1}") public static Intent intentForDeepLinkMethod1722(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1723/{param1}") public static Intent intentForDeepLinkMethod1723(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1724/{param1}") public static Intent intentForDeepLinkMethod1724(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1725/{param1}") public static Intent intentForDeepLinkMethod1725(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1726/{param1}") public static Intent intentForDeepLinkMethod1726(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1727/{param1}") public static Intent intentForDeepLinkMethod1727(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1728/{param1}") public static Intent intentForDeepLinkMethod1728(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1729/{param1}") public static Intent intentForDeepLinkMethod1729(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1730/{param1}") public static Intent intentForDeepLinkMethod1730(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1731/{param1}") public static Intent intentForDeepLinkMethod1731(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1732/{param1}") public static Intent intentForDeepLinkMethod1732(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1733/{param1}") public static Intent intentForDeepLinkMethod1733(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1734/{param1}") public static Intent intentForDeepLinkMethod1734(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1735/{param1}") public static Intent intentForDeepLinkMethod1735(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1736/{param1}") public static Intent intentForDeepLinkMethod1736(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1737/{param1}") public static Intent intentForDeepLinkMethod1737(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1738/{param1}") public static Intent intentForDeepLinkMethod1738(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1739/{param1}") public static Intent intentForDeepLinkMethod1739(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1740/{param1}") public static Intent intentForDeepLinkMethod1740(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1741/{param1}") public static Intent intentForDeepLinkMethod1741(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1742/{param1}") public static Intent intentForDeepLinkMethod1742(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1743/{param1}") public static Intent intentForDeepLinkMethod1743(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1744/{param1}") public static Intent intentForDeepLinkMethod1744(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1745/{param1}") public static Intent intentForDeepLinkMethod1745(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1746/{param1}") public static Intent intentForDeepLinkMethod1746(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1747/{param1}") public static Intent intentForDeepLinkMethod1747(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1748/{param1}") public static Intent intentForDeepLinkMethod1748(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1749/{param1}") public static Intent intentForDeepLinkMethod1749(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1750/{param1}") public static Intent intentForDeepLinkMethod1750(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1751/{param1}") public static Intent intentForDeepLinkMethod1751(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1752/{param1}") public static Intent intentForDeepLinkMethod1752(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1753/{param1}") public static Intent intentForDeepLinkMethod1753(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1754/{param1}") public static Intent intentForDeepLinkMethod1754(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1755/{param1}") public static Intent intentForDeepLinkMethod1755(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1756/{param1}") public static Intent intentForDeepLinkMethod1756(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1757/{param1}") public static Intent intentForDeepLinkMethod1757(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1758/{param1}") public static Intent intentForDeepLinkMethod1758(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1759/{param1}") public static Intent intentForDeepLinkMethod1759(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1760/{param1}") public static Intent intentForDeepLinkMethod1760(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1761/{param1}") public static Intent intentForDeepLinkMethod1761(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1762/{param1}") public static Intent intentForDeepLinkMethod1762(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1763/{param1}") public static Intent intentForDeepLinkMethod1763(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1764/{param1}") public static Intent intentForDeepLinkMethod1764(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1765/{param1}") public static Intent intentForDeepLinkMethod1765(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1766/{param1}") public static Intent intentForDeepLinkMethod1766(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1767/{param1}") public static Intent intentForDeepLinkMethod1767(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1768/{param1}") public static Intent intentForDeepLinkMethod1768(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1769/{param1}") public static Intent intentForDeepLinkMethod1769(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1770/{param1}") public static Intent intentForDeepLinkMethod1770(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1771/{param1}") public static Intent intentForDeepLinkMethod1771(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1772/{param1}") public static Intent intentForDeepLinkMethod1772(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1773/{param1}") public static Intent intentForDeepLinkMethod1773(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1774/{param1}") public static Intent intentForDeepLinkMethod1774(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1775/{param1}") public static Intent intentForDeepLinkMethod1775(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1776/{param1}") public static Intent intentForDeepLinkMethod1776(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1777/{param1}") public static Intent intentForDeepLinkMethod1777(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1778/{param1}") public static Intent intentForDeepLinkMethod1778(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1779/{param1}") public static Intent intentForDeepLinkMethod1779(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1780/{param1}") public static Intent intentForDeepLinkMethod1780(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1781/{param1}") public static Intent intentForDeepLinkMethod1781(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1782/{param1}") public static Intent intentForDeepLinkMethod1782(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1783/{param1}") public static Intent intentForDeepLinkMethod1783(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1784/{param1}") public static Intent intentForDeepLinkMethod1784(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1785/{param1}") public static Intent intentForDeepLinkMethod1785(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1786/{param1}") public static Intent intentForDeepLinkMethod1786(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1787/{param1}") public static Intent intentForDeepLinkMethod1787(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1788/{param1}") public static Intent intentForDeepLinkMethod1788(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1789/{param1}") public static Intent intentForDeepLinkMethod1789(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1790/{param1}") public static Intent intentForDeepLinkMethod1790(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1791/{param1}") public static Intent intentForDeepLinkMethod1791(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1792/{param1}") public static Intent intentForDeepLinkMethod1792(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1793/{param1}") public static Intent intentForDeepLinkMethod1793(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1794/{param1}") public static Intent intentForDeepLinkMethod1794(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1795/{param1}") public static Intent intentForDeepLinkMethod1795(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1796/{param1}") public static Intent intentForDeepLinkMethod1796(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1797/{param1}") public static Intent intentForDeepLinkMethod1797(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1798/{param1}") public static Intent intentForDeepLinkMethod1798(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1799/{param1}") public static Intent intentForDeepLinkMethod1799(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1800/{param1}") public static Intent intentForDeepLinkMethod1800(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1801/{param1}") public static Intent intentForDeepLinkMethod1801(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1802/{param1}") public static Intent intentForDeepLinkMethod1802(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1803/{param1}") public static Intent intentForDeepLinkMethod1803(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1804/{param1}") public static Intent intentForDeepLinkMethod1804(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1805/{param1}") public static Intent intentForDeepLinkMethod1805(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1806/{param1}") public static Intent intentForDeepLinkMethod1806(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1807/{param1}") public static Intent intentForDeepLinkMethod1807(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1808/{param1}") public static Intent intentForDeepLinkMethod1808(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1809/{param1}") public static Intent intentForDeepLinkMethod1809(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1810/{param1}") public static Intent intentForDeepLinkMethod1810(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1811/{param1}") public static Intent intentForDeepLinkMethod1811(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1812/{param1}") public static Intent intentForDeepLinkMethod1812(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1813/{param1}") public static Intent intentForDeepLinkMethod1813(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1814/{param1}") public static Intent intentForDeepLinkMethod1814(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1815/{param1}") public static Intent intentForDeepLinkMethod1815(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1816/{param1}") public static Intent intentForDeepLinkMethod1816(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1817/{param1}") public static Intent intentForDeepLinkMethod1817(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1818/{param1}") public static Intent intentForDeepLinkMethod1818(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1819/{param1}") public static Intent intentForDeepLinkMethod1819(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1820/{param1}") public static Intent intentForDeepLinkMethod1820(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1821/{param1}") public static Intent intentForDeepLinkMethod1821(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1822/{param1}") public static Intent intentForDeepLinkMethod1822(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1823/{param1}") public static Intent intentForDeepLinkMethod1823(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1824/{param1}") public static Intent intentForDeepLinkMethod1824(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1825/{param1}") public static Intent intentForDeepLinkMethod1825(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1826/{param1}") public static Intent intentForDeepLinkMethod1826(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1827/{param1}") public static Intent intentForDeepLinkMethod1827(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1828/{param1}") public static Intent intentForDeepLinkMethod1828(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1829/{param1}") public static Intent intentForDeepLinkMethod1829(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1830/{param1}") public static Intent intentForDeepLinkMethod1830(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1831/{param1}") public static Intent intentForDeepLinkMethod1831(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1832/{param1}") public static Intent intentForDeepLinkMethod1832(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1833/{param1}") public static Intent intentForDeepLinkMethod1833(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1834/{param1}") public static Intent intentForDeepLinkMethod1834(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1835/{param1}") public static Intent intentForDeepLinkMethod1835(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1836/{param1}") public static Intent intentForDeepLinkMethod1836(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1837/{param1}") public static Intent intentForDeepLinkMethod1837(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1838/{param1}") public static Intent intentForDeepLinkMethod1838(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1839/{param1}") public static Intent intentForDeepLinkMethod1839(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1840/{param1}") public static Intent intentForDeepLinkMethod1840(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1841/{param1}") public static Intent intentForDeepLinkMethod1841(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1842/{param1}") public static Intent intentForDeepLinkMethod1842(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1843/{param1}") public static Intent intentForDeepLinkMethod1843(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1844/{param1}") public static Intent intentForDeepLinkMethod1844(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1845/{param1}") public static Intent intentForDeepLinkMethod1845(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1846/{param1}") public static Intent intentForDeepLinkMethod1846(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1847/{param1}") public static Intent intentForDeepLinkMethod1847(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1848/{param1}") public static Intent intentForDeepLinkMethod1848(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1849/{param1}") public static Intent intentForDeepLinkMethod1849(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1850/{param1}") public static Intent intentForDeepLinkMethod1850(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1851/{param1}") public static Intent intentForDeepLinkMethod1851(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1852/{param1}") public static Intent intentForDeepLinkMethod1852(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1853/{param1}") public static Intent intentForDeepLinkMethod1853(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1854/{param1}") public static Intent intentForDeepLinkMethod1854(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1855/{param1}") public static Intent intentForDeepLinkMethod1855(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1856/{param1}") public static Intent intentForDeepLinkMethod1856(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1857/{param1}") public static Intent intentForDeepLinkMethod1857(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1858/{param1}") public static Intent intentForDeepLinkMethod1858(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1859/{param1}") public static Intent intentForDeepLinkMethod1859(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1860/{param1}") public static Intent intentForDeepLinkMethod1860(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1861/{param1}") public static Intent intentForDeepLinkMethod1861(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1862/{param1}") public static Intent intentForDeepLinkMethod1862(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1863/{param1}") public static Intent intentForDeepLinkMethod1863(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1864/{param1}") public static Intent intentForDeepLinkMethod1864(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1865/{param1}") public static Intent intentForDeepLinkMethod1865(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1866/{param1}") public static Intent intentForDeepLinkMethod1866(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1867/{param1}") public static Intent intentForDeepLinkMethod1867(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1868/{param1}") public static Intent intentForDeepLinkMethod1868(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1869/{param1}") public static Intent intentForDeepLinkMethod1869(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1870/{param1}") public static Intent intentForDeepLinkMethod1870(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1871/{param1}") public static Intent intentForDeepLinkMethod1871(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1872/{param1}") public static Intent intentForDeepLinkMethod1872(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1873/{param1}") public static Intent intentForDeepLinkMethod1873(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1874/{param1}") public static Intent intentForDeepLinkMethod1874(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1875/{param1}") public static Intent intentForDeepLinkMethod1875(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1876/{param1}") public static Intent intentForDeepLinkMethod1876(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1877/{param1}") public static Intent intentForDeepLinkMethod1877(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1878/{param1}") public static Intent intentForDeepLinkMethod1878(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1879/{param1}") public static Intent intentForDeepLinkMethod1879(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1880/{param1}") public static Intent intentForDeepLinkMethod1880(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1881/{param1}") public static Intent intentForDeepLinkMethod1881(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1882/{param1}") public static Intent intentForDeepLinkMethod1882(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1883/{param1}") public static Intent intentForDeepLinkMethod1883(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1884/{param1}") public static Intent intentForDeepLinkMethod1884(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1885/{param1}") public static Intent intentForDeepLinkMethod1885(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1886/{param1}") public static Intent intentForDeepLinkMethod1886(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1887/{param1}") public static Intent intentForDeepLinkMethod1887(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1888/{param1}") public static Intent intentForDeepLinkMethod1888(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1889/{param1}") public static Intent intentForDeepLinkMethod1889(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1890/{param1}") public static Intent intentForDeepLinkMethod1890(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1891/{param1}") public static Intent intentForDeepLinkMethod1891(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1892/{param1}") public static Intent intentForDeepLinkMethod1892(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1893/{param1}") public static Intent intentForDeepLinkMethod1893(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1894/{param1}") public static Intent intentForDeepLinkMethod1894(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1895/{param1}") public static Intent intentForDeepLinkMethod1895(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1896/{param1}") public static Intent intentForDeepLinkMethod1896(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1897/{param1}") public static Intent intentForDeepLinkMethod1897(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1898/{param1}") public static Intent intentForDeepLinkMethod1898(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1899/{param1}") public static Intent intentForDeepLinkMethod1899(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1900/{param1}") public static Intent intentForDeepLinkMethod1900(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1901/{param1}") public static Intent intentForDeepLinkMethod1901(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1902/{param1}") public static Intent intentForDeepLinkMethod1902(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1903/{param1}") public static Intent intentForDeepLinkMethod1903(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1904/{param1}") public static Intent intentForDeepLinkMethod1904(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1905/{param1}") public static Intent intentForDeepLinkMethod1905(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1906/{param1}") public static Intent intentForDeepLinkMethod1906(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1907/{param1}") public static Intent intentForDeepLinkMethod1907(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1908/{param1}") public static Intent intentForDeepLinkMethod1908(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1909/{param1}") public static Intent intentForDeepLinkMethod1909(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1910/{param1}") public static Intent intentForDeepLinkMethod1910(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1911/{param1}") public static Intent intentForDeepLinkMethod1911(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1912/{param1}") public static Intent intentForDeepLinkMethod1912(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1913/{param1}") public static Intent intentForDeepLinkMethod1913(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1914/{param1}") public static Intent intentForDeepLinkMethod1914(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1915/{param1}") public static Intent intentForDeepLinkMethod1915(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1916/{param1}") public static Intent intentForDeepLinkMethod1916(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1917/{param1}") public static Intent intentForDeepLinkMethod1917(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1918/{param1}") public static Intent intentForDeepLinkMethod1918(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1919/{param1}") public static Intent intentForDeepLinkMethod1919(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1920/{param1}") public static Intent intentForDeepLinkMethod1920(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1921/{param1}") public static Intent intentForDeepLinkMethod1921(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1922/{param1}") public static Intent intentForDeepLinkMethod1922(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1923/{param1}") public static Intent intentForDeepLinkMethod1923(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1924/{param1}") public static Intent intentForDeepLinkMethod1924(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1925/{param1}") public static Intent intentForDeepLinkMethod1925(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1926/{param1}") public static Intent intentForDeepLinkMethod1926(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1927/{param1}") public static Intent intentForDeepLinkMethod1927(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1928/{param1}") public static Intent intentForDeepLinkMethod1928(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1929/{param1}") public static Intent intentForDeepLinkMethod1929(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1930/{param1}") public static Intent intentForDeepLinkMethod1930(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1931/{param1}") public static Intent intentForDeepLinkMethod1931(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1932/{param1}") public static Intent intentForDeepLinkMethod1932(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1933/{param1}") public static Intent intentForDeepLinkMethod1933(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1934/{param1}") public static Intent intentForDeepLinkMethod1934(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1935/{param1}") public static Intent intentForDeepLinkMethod1935(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1936/{param1}") public static Intent intentForDeepLinkMethod1936(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1937/{param1}") public static Intent intentForDeepLinkMethod1937(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1938/{param1}") public static Intent intentForDeepLinkMethod1938(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1939/{param1}") public static Intent intentForDeepLinkMethod1939(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1940/{param1}") public static Intent intentForDeepLinkMethod1940(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1941/{param1}") public static Intent intentForDeepLinkMethod1941(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1942/{param1}") public static Intent intentForDeepLinkMethod1942(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1943/{param1}") public static Intent intentForDeepLinkMethod1943(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1944/{param1}") public static Intent intentForDeepLinkMethod1944(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1945/{param1}") public static Intent intentForDeepLinkMethod1945(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1946/{param1}") public static Intent intentForDeepLinkMethod1946(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1947/{param1}") public static Intent intentForDeepLinkMethod1947(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1948/{param1}") public static Intent intentForDeepLinkMethod1948(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1949/{param1}") public static Intent intentForDeepLinkMethod1949(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1950/{param1}") public static Intent intentForDeepLinkMethod1950(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1951/{param1}") public static Intent intentForDeepLinkMethod1951(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1952/{param1}") public static Intent intentForDeepLinkMethod1952(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1953/{param1}") public static Intent intentForDeepLinkMethod1953(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1954/{param1}") public static Intent intentForDeepLinkMethod1954(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1955/{param1}") public static Intent intentForDeepLinkMethod1955(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1956/{param1}") public static Intent intentForDeepLinkMethod1956(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1957/{param1}") public static Intent intentForDeepLinkMethod1957(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1958/{param1}") public static Intent intentForDeepLinkMethod1958(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1959/{param1}") public static Intent intentForDeepLinkMethod1959(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1960/{param1}") public static Intent intentForDeepLinkMethod1960(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1961/{param1}") public static Intent intentForDeepLinkMethod1961(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1962/{param1}") public static Intent intentForDeepLinkMethod1962(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1963/{param1}") public static Intent intentForDeepLinkMethod1963(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1964/{param1}") public static Intent intentForDeepLinkMethod1964(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1965/{param1}") public static Intent intentForDeepLinkMethod1965(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1966/{param1}") public static Intent intentForDeepLinkMethod1966(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1967/{param1}") public static Intent intentForDeepLinkMethod1967(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1968/{param1}") public static Intent intentForDeepLinkMethod1968(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1969/{param1}") public static Intent intentForDeepLinkMethod1969(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1970/{param1}") public static Intent intentForDeepLinkMethod1970(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1971/{param1}") public static Intent intentForDeepLinkMethod1971(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1972/{param1}") public static Intent intentForDeepLinkMethod1972(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1973/{param1}") public static Intent intentForDeepLinkMethod1973(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1974/{param1}") public static Intent intentForDeepLinkMethod1974(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1975/{param1}") public static Intent intentForDeepLinkMethod1975(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1976/{param1}") public static Intent intentForDeepLinkMethod1976(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1977/{param1}") public static Intent intentForDeepLinkMethod1977(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1978/{param1}") public static Intent intentForDeepLinkMethod1978(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1979/{param1}") public static Intent intentForDeepLinkMethod1979(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1980/{param1}") public static Intent intentForDeepLinkMethod1980(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1981/{param1}") public static Intent intentForDeepLinkMethod1981(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1982/{param1}") public static Intent intentForDeepLinkMethod1982(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1983/{param1}") public static Intent intentForDeepLinkMethod1983(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1984/{param1}") public static Intent intentForDeepLinkMethod1984(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1985/{param1}") public static Intent intentForDeepLinkMethod1985(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1986/{param1}") public static Intent intentForDeepLinkMethod1986(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1987/{param1}") public static Intent intentForDeepLinkMethod1987(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1988/{param1}") public static Intent intentForDeepLinkMethod1988(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1989/{param1}") public static Intent intentForDeepLinkMethod1989(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1990/{param1}") public static Intent intentForDeepLinkMethod1990(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1991/{param1}") public static Intent intentForDeepLinkMethod1991(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1992/{param1}") public static Intent intentForDeepLinkMethod1992(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1993/{param1}") public static Intent intentForDeepLinkMethod1993(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1994/{param1}") public static Intent intentForDeepLinkMethod1994(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1995/{param1}") public static Intent intentForDeepLinkMethod1995(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1996/{param1}") public static Intent intentForDeepLinkMethod1996(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1997/{param1}") public static Intent intentForDeepLinkMethod1997(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1998/{param1}") public static Intent intentForDeepLinkMethod1998(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink1999/{param1}") public static Intent intentForDeepLinkMethod1999(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } @DeepLink("dld://methodDeepLink2000/{param1}") public static Intent intentForDeepLinkMethod2000(Context context) { return new Intent(context, ScaleTestActivity.class).setAction(ACTION_DEEP_LINK_METHOD); } private void showToast(String message) { Toast.makeText(this, "Deep Link: " + message, Toast.LENGTH_SHORT).show(); } }
5,948
0
Create_ds/DeepLinkDispatch/sample-benchmarkable-library/src/main/java/com/airbnb/deeplinkdispatch/sample
Create_ds/DeepLinkDispatch/sample-benchmarkable-library/src/main/java/com/airbnb/deeplinkdispatch/sample/benchmarkable/BenchmarkDeepLinkModule.java
package com.airbnb.deeplinkdispatch.sample.benchmarkable; import com.airbnb.deeplinkdispatch.DeepLinkModule; @DeepLinkModule public class BenchmarkDeepLinkModule { }
5,949
0
Create_ds/dyno/dyno-redisson/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-redisson/src/main/java/com/netflix/dyno/redisson/RedissonDemo.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.redisson; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.util.concurrent.Future; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import com.lambdaworks.redis.RedisAsyncConnection; import com.lambdaworks.redis.RedisClient; public class RedissonDemo { int numThreads = 20; int eventLoop = 4; private final EventLoopGroup eg; private final ExecutorService threadPool; private final AtomicBoolean stop; RedisClient client = null; RedisAsyncConnection<String, String> rConn = null; RedissonDemo(int nThreads, int eLoop) { numThreads = nThreads; eventLoop = eLoop; eg = new NioEventLoopGroup(eventLoop); threadPool = Executors.newFixedThreadPool(numThreads + 1); stop = new AtomicBoolean(false); client = new RedisClient(eg, "ec2-54-227-136-137.compute-1.amazonaws.com", 8102); rConn = client.connectAsync(); } public RedissonDemo(String nThreads, String loop) { this(Integer.parseInt(nThreads), Integer.parseInt(loop)); } public void run() throws Exception { System.out.println("\n\nTHREADS: " + numThreads + " LOOP: " + eventLoop); final String value1 = "dcfa7d0973834e5c9f480b65de19d684dcfa7d097383dcfa7d0973834e5c9f480b65de19d684dcfa7d097383dcfa7d0973834e5c9f480b65de19d684dcfa7d097383dcfa7d0973834e5c9f480b65de19d684dcfa7d097383"; final String StaticValue = value1 + value1 + value1 + value1 + value1; try { Future<String> result = rConn.get("testPuneet"); String s = result.get(); System.out.println("testPuneet: " + s); // for (int i=0; i<1000; i++) { // System.out.println(i); // rConn.set("T" + i, StaticValue).get(); // } final RedisAsyncConnection<String, String> asyncConn = rConn; //final CountDownLatch latch = new CountDownLatch(10); final AtomicInteger total = new AtomicInteger(0); final AtomicInteger prev = new AtomicInteger(0); final List<String> list = new ArrayList<String>(); for (int i = 0; i < 10000; i++) { list.add("T" + i); } final int size = list.size(); final Random random = new Random(); for (int i = 0; i < numThreads; i++) { threadPool.submit(new Callable<Void>() { @Override public Void call() throws Exception { while (!stop.get() && !Thread.currentThread().isInterrupted()) { int index = random.nextInt(size); try { asyncConn.get(list.get(index)).get(1000, TimeUnit.MILLISECONDS); } catch (Exception e) { //e.printStackTrace(); break; } total.incrementAndGet(); } return null; } }); } threadPool.submit(new Callable<Void>() { @Override public Void call() throws Exception { while (!stop.get() && !Thread.currentThread().isInterrupted()) { try { int tCount = total.get(); System.out.println("RPS: " + (tCount - prev.get()) / 5); prev.set(tCount); Thread.sleep(5000); //asyncConn.ping().get(1000, TimeUnit.MILLISECONDS); } catch (Exception e) { //System.out.println("PING FAILURE " + e.getMessage()); e.printStackTrace(); break; } } return null; } }); // Thread.sleep(1000*300); // threadPool.shutdownNow(); } finally { // if (rConn != null) { // rConn.close(); // } // if (client != null) { // client.shutdown(); // } // eg.shutdownGracefully().get(); } } public void stop() { stop.set(true); threadPool.shutdownNow(); if (rConn != null) { rConn.close(); } if (client != null) { client.shutdown(); } try { eg.shutdownGracefully().get(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ExecutionException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static void main(String[] args) { RedissonDemo demo = new RedissonDemo(10, 2); try { demo.run(); } catch (Exception e) { e.printStackTrace(); } } }
5,950
0
Create_ds/dyno/dyno-redisson/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-redisson/src/main/java/com/netflix/dyno/redisson/DynoRedissonClient.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.redisson; import io.netty.channel.nio.NioEventLoopGroup; import java.util.concurrent.Future; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.lambdaworks.redis.RedisAsyncConnection; import com.netflix.dyno.connectionpool.AsyncOperation; import com.netflix.dyno.connectionpool.ConnectionPool; import com.netflix.dyno.connectionpool.DecoratingListenableFuture; import com.netflix.dyno.connectionpool.ListenableFuture; import com.netflix.dyno.connectionpool.OperationResult; import com.netflix.dyno.connectionpool.exception.DynoException; import com.netflix.dyno.connectionpool.impl.ConnectionPoolConfigurationImpl; import com.netflix.dyno.connectionpool.impl.ConnectionPoolImpl; import com.netflix.dyno.connectionpool.impl.HostConnectionPoolFactory.Type; import com.netflix.dyno.contrib.DynoCPMonitor; import com.netflix.dyno.contrib.DynoOPMonitor; public class DynoRedissonClient { private static final Logger Logger = LoggerFactory.getLogger(DynoRedissonClient.class); private final ConnectionPool<RedisAsyncConnection<String, String>> connPool; public DynoRedissonClient(String name, ConnectionPool<RedisAsyncConnection<String, String>> pool) { this.connPool = pool; } private enum OpName { Set, Delete, Get, GetBulk, GetAsync; } public Future<OperationResult<String>> get(final String key) throws DynoException { return connPool.executeAsync(new AsyncOperation<RedisAsyncConnection<String, String>, String>() { @Override public String getName() { return OpName.Get.name(); } @Override public String getStringKey() { return key; } @Override public ListenableFuture<String> executeAsync(RedisAsyncConnection<String, String> client) throws DynoException { return new DecoratingListenableFuture<String>((client.get(key))); } @Override public byte[] getBinaryKey() { return null; } }); } public Future<OperationResult<String>> get(final String key, final String hashtag) throws DynoException { return connPool.executeAsync(new AsyncOperation<RedisAsyncConnection<String, String>, String>() { @Override public String getName() { return OpName.Get.name(); } @Override public String getStringKey() { return key; } @Override public ListenableFuture<String> executeAsync(RedisAsyncConnection<String, String> client) throws DynoException { return new DecoratingListenableFuture<String>((client.get(key))); } @Override public byte[] getBinaryKey() { return null; } }); } public Future<OperationResult<String>> set(final String key, final String value) throws DynoException { return connPool.executeAsync(new AsyncOperation<RedisAsyncConnection<String, String>, String>() { @Override public String getName() { return OpName.Set.name(); } @Override public String getStringKey() { return key; } @Override public ListenableFuture<String> executeAsync(RedisAsyncConnection<String, String> client) throws DynoException { return new DecoratingListenableFuture<String>((client.set(key, value))); } @Override public byte[] getBinaryKey() { return null; } }); } // TODO: hashtag has support for this Redisson API is not complete public Future<OperationResult<String>> set(final String key, final String value, final String hashtag) throws DynoException { return connPool.executeAsync(new AsyncOperation<RedisAsyncConnection<String, String>, String>() { @Override public String getName() { return OpName.Set.name(); } @Override public String getStringKey() { return key; } @Override public ListenableFuture<String> executeAsync(RedisAsyncConnection<String, String> client) throws DynoException { return new DecoratingListenableFuture<String>((client.set(key, value))); } @Override public byte[] getBinaryKey() { return null; } }); } public static class Builder { private String appName; private String clusterName; private ConnectionPoolConfigurationImpl cpConfig; public Builder(String name) { appName = name; } public Builder withDynomiteClusterName(String cluster) { clusterName = cluster; return this; } public Builder withCPConfig(ConnectionPoolConfigurationImpl config) { cpConfig = config; return this; } public DynoRedissonClient build() { assert (appName != null); assert (clusterName != null); assert (cpConfig != null); DynoCPMonitor cpMonitor = new DynoCPMonitor(appName); DynoOPMonitor opMonitor = new DynoOPMonitor(appName); RedissonConnectionFactory connFactory = new RedissonConnectionFactory(new NioEventLoopGroup(4), opMonitor); ConnectionPoolImpl<RedisAsyncConnection<String, String>> pool = new ConnectionPoolImpl<RedisAsyncConnection<String, String>>( connFactory, cpConfig, cpMonitor, Type.Async); try { pool.start().get(); } catch (Exception e) { if (cpConfig.getFailOnStartupIfNoHosts()) { throw new RuntimeException(e); } Logger.warn("UNABLE TO START CONNECTION POOL -- IDLING"); pool.idle(); } final DynoRedissonClient client = new DynoRedissonClient(appName, pool); return client; } public static Builder withName(String name) { return new Builder(name); } } }
5,951
0
Create_ds/dyno/dyno-redisson/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-redisson/src/main/java/com/netflix/dyno/redisson/RedissonConnectionFactory.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.redisson; import com.lambdaworks.redis.RedisAsyncConnection; import com.lambdaworks.redis.RedisClient; import com.netflix.dyno.connectionpool.AsyncOperation; import com.netflix.dyno.connectionpool.Connection; import com.netflix.dyno.connectionpool.ConnectionContext; import com.netflix.dyno.connectionpool.ConnectionFactory; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.HostConnectionPool; import com.netflix.dyno.connectionpool.ListenableFuture; import com.netflix.dyno.connectionpool.Operation; import com.netflix.dyno.connectionpool.OperationMonitor; import com.netflix.dyno.connectionpool.OperationResult; import com.netflix.dyno.connectionpool.exception.DynoConnectException; import com.netflix.dyno.connectionpool.exception.DynoException; import com.netflix.dyno.connectionpool.impl.ConnectionContextImpl; import com.netflix.dyno.connectionpool.impl.FutureOperationalResultImpl; import com.netflix.dyno.connectionpool.impl.OperationResultImpl; import io.netty.channel.EventLoopGroup; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicReference; public class RedissonConnectionFactory implements ConnectionFactory<RedisAsyncConnection<String, String>> { private final EventLoopGroup eventGroupLoop; private final OperationMonitor opMonitor; public RedissonConnectionFactory(EventLoopGroup group, OperationMonitor operationMonitor) { eventGroupLoop = group; opMonitor = operationMonitor; } @Override public Connection<RedisAsyncConnection<String, String>> createConnection(HostConnectionPool<RedisAsyncConnection<String, String>> pool) throws DynoConnectException { return new RedissonConnection(pool, eventGroupLoop, opMonitor); } @Override public Connection<RedisAsyncConnection<String, String>> createConnectionWithDataStore(HostConnectionPool<RedisAsyncConnection<String, String>> pool) throws DynoConnectException { throw new UnsupportedOperationException(""); } @Override public Connection<RedisAsyncConnection<String, String>> createConnectionWithConsistencyLevel(HostConnectionPool<RedisAsyncConnection<String, String>> pool, String consistency) throws DynoConnectException { throw new UnsupportedOperationException(""); } public static class RedissonConnection implements Connection<RedisAsyncConnection<String, String>> { private final HostConnectionPool<RedisAsyncConnection<String, String>> hostPool; private final RedisClient client; private final OperationMonitor opMonitor; private RedisAsyncConnection<String, String> rConn = null; private final AtomicReference<DynoConnectException> lastEx = new AtomicReference<DynoConnectException>(null); private final ConnectionContextImpl context = new ConnectionContextImpl(); public RedissonConnection(HostConnectionPool<RedisAsyncConnection<String, String>> hPool, EventLoopGroup eventGroupLoop, OperationMonitor opMonitor) { this.hostPool = hPool; Host host = hostPool.getHost(); this.opMonitor = opMonitor; this.client = new RedisClient(eventGroupLoop, host.getHostAddress(), host.getPort()); } @Override public <R> OperationResult<R> execute(Operation<RedisAsyncConnection<String, String>, R> op) throws DynoException { try { R result = op.execute(rConn, null); // Note that connection context is not implemented yet return new OperationResultImpl<R>(op.getName(), result, opMonitor) .attempts(1) .setNode(getHost()); } catch (DynoConnectException e) { lastEx.set(e); throw e; } } @Override public <R> ListenableFuture<OperationResult<R>> executeAsync(AsyncOperation<RedisAsyncConnection<String, String>, R> op) throws DynoException { final long start = System.currentTimeMillis(); try { Future<R> future = op.executeAsync(rConn); return new FutureOperationalResultImpl<R>(op.getName(), future, start, opMonitor).node(getHost()); } catch (DynoConnectException e) { lastEx.set(e); throw e; } } @Override public void close() { rConn.close(); client.shutdown(); } @Override public Host getHost() { return hostPool.getHost(); } @Override public void open() throws DynoException { rConn = client.connectAsync(); } @Override public DynoConnectException getLastException() { return lastEx.get(); } @Override public HostConnectionPool<RedisAsyncConnection<String, String>> getParentConnectionPool() { return hostPool; } @Override public void execPing() { try { rConn.ping().get(); } catch (InterruptedException e) { } catch (ExecutionException e) { throw new DynoConnectException(e); } } @Override public ConnectionContext getContext() { return context; } } }
5,952
0
Create_ds/dyno/dyno-redisson/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-redisson/src/main/java/com/netflix/dyno/redisson/DynoRedissonDemoResource.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.redisson; import java.util.concurrent.atomic.AtomicReference; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Path("/dyno/demo/redisson") public class DynoRedissonDemoResource { private static final Logger Logger = LoggerFactory.getLogger(DynoRedissonDemoResource.class); private static final AtomicReference<RedissonDemo> demo = new AtomicReference<RedissonDemo>(null); public DynoRedissonDemoResource() { } @Path("/start/{threads}/{loop}") @GET @Consumes(MediaType.TEXT_PLAIN) @Produces(MediaType.TEXT_PLAIN) public String startRedisson(@PathParam("threads") int nThreads, @PathParam("loop") int loop) throws Exception { Logger.info("Starting redisson demo"); try { demo.set(new RedissonDemo(nThreads, loop)); demo.get().run(); return "redisson demo!" + "\n"; } catch (Exception e) { Logger.error("Error starting datafill", e); return "redisson demo failed"; } } @Path("/stop") @GET @Consumes(MediaType.TEXT_PLAIN) @Produces(MediaType.TEXT_PLAIN) public String stopRedisson() throws Exception { Logger.info("stopping redisson demo"); try { demo.get().stop(); return "stop!" + "\n"; } catch (Exception e) { Logger.error("Error starting datafill", e); return "redisson demo failed"; } } }
5,953
0
Create_ds/dyno/dyno-contrib/src/test/java/com/netflix/dyno
Create_ds/dyno/dyno-contrib/src/test/java/com/netflix/dyno/contrib/EurekaHostsSupplierTest.java
/** * Copyright 2020 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.contrib; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import com.netflix.appinfo.AmazonInfo; import com.netflix.appinfo.AmazonInfo.MetaDataKey; import com.netflix.appinfo.InstanceInfo; import com.netflix.discovery.EurekaClient; import com.netflix.discovery.shared.Application; import com.netflix.dyno.connectionpool.Host; import java.util.List; import java.util.UUID; import org.junit.Before; import org.junit.Test; public class EurekaHostsSupplierTest { private static final String APPLICATION_NAME = "DYNOTEST"; private EurekaClient eurekaClient; private EurekaHostsSupplier hostsSupplier; @Before public void setUp() { eurekaClient = mock(EurekaClient.class); hostsSupplier = new EurekaHostsSupplier(APPLICATION_NAME, eurekaClient); } @Test public void testGetHosts() { String zone = "us-east-1c"; String hostname = "1.2.3.4"; Application app = new Application(); AmazonInfo amazonInfo = AmazonInfo.Builder.newBuilder() .addMetadata(MetaDataKey.availabilityZone, zone).build(); InstanceInfo instance = InstanceInfo.Builder.newBuilder() .setInstanceId(UUID.randomUUID().toString()) .setDataCenterInfo(amazonInfo) .setHostName(hostname) .setAppName(APPLICATION_NAME) .build(); app.addInstance(instance); when(eurekaClient.getApplication(APPLICATION_NAME)).thenReturn(app); List<Host> hosts = hostsSupplier.getHosts(); assertFalse(hosts.isEmpty()); assertEquals(hostname, hosts.get(0).getHostName()); assertEquals(zone, hosts.get(0).getRack()); } }
5,954
0
Create_ds/dyno/dyno-contrib/src/test/java/com/netflix/dyno
Create_ds/dyno/dyno-contrib/src/test/java/com/netflix/dyno/contrib/ElasticConnectionPoolConfigurationPublisherTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.contrib; import static org.junit.Assert.assertTrue; import java.util.Map; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; import org.junit.Before; import org.junit.Test; import com.netflix.dyno.connectionpool.ConnectionPoolConfiguration; public class ElasticConnectionPoolConfigurationPublisherTest { private ConnectionPoolConfiguration config; @Before public void before() { config = new ArchaiusConnectionPoolConfiguration("UnitTest") .setLoadBalancingStrategy(ConnectionPoolConfiguration.LoadBalancingStrategy.RoundRobin) .setMaxConnsPerHost(100); } @Test public void testLibraryVersion() { ElasticConnectionPoolConfigurationPublisher publisher = new ElasticConnectionPoolConfigurationPublisher("ClientApp", "dyno_cluster_1", "unit-test-vip", config); Map<String, String> versions = publisher.getLibraryVersion(this.getClass(), "dyno-core"); assertTrue(versions.size() == 1 || versions.size() == 0); // dyno-contrib depends on dyno-core } @Test public void testFindVersionFindIndex() { ElasticConnectionPoolConfigurationPublisher publisher = new ElasticConnectionPoolConfigurationPublisher("ClientApp", "dyno_cluster_1", "unit-test-vip", config); assertTrue(publisher.findVersionStartIndex(null) < 0); assertTrue(publisher.findVersionStartIndex("foo") < 0); assertTrue(publisher.findVersionStartIndex("foo-bar.jar") < 0); assertTrue(publisher.findVersionStartIndex("foo-bar-2.3") == 8); assertTrue(publisher.findVersionStartIndex("foo-bar-2.3.1-SNAPSHOT") == 8); assertTrue(publisher.findVersionStartIndex("foo-bar-baz-2.3") == 12); } @Test(expected = IllegalArgumentException.class) public void testCreateJsonFromConfigNullConfig() throws JSONException { ElasticConnectionPoolConfigurationPublisher publisher = new ElasticConnectionPoolConfigurationPublisher("ClientApp", "dyno_cluster_1", "unit-test-vip", config); publisher.createJsonFromConfig(null); } @Test public void testCreateJsonFromConfig() throws JSONException { ElasticConnectionPoolConfigurationPublisher publisher = new ElasticConnectionPoolConfigurationPublisher("ClientApp", "dyno_cluster_1", "unit-test-vip", config); JSONObject json = publisher.createJsonFromConfig(config); assertTrue(json.has("ApplicationName")); assertTrue(json.has("DynomiteClusterName")); assertTrue(json.has("MaxConnsPerHost")); } }
5,955
0
Create_ds/dyno/dyno-contrib/src/test/java/com/netflix/dyno
Create_ds/dyno/dyno-contrib/src/test/java/com/netflix/dyno/contrib/ConsulHostsSupplierTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.contrib; import com.ecwid.consul.v1.ConsulClient; import com.ecwid.consul.v1.QueryParams; import com.ecwid.consul.v1.agent.model.NewCheck; import com.ecwid.consul.v1.agent.model.NewService; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.contrib.consul.ConsulHostsSupplier; import com.pszymczyk.consul.ConsulProcess; import com.pszymczyk.consul.ConsulStarterBuilder; import org.codehaus.jettison.json.JSONException; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import java.util.List; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; public class ConsulHostsSupplierTest { private ConsulProcess consulServer; private ConsulClient consulClient; private static String APPLICATION_NAME = "testApp"; @Before public void beforeEach() { String config = "{" + "\"datacenter\": \"test-dc\"," + "\"log_level\": \"INFO\"," + "\"node_name\": \"foobar\"" + "}"; consulServer = ConsulStarterBuilder.consulStarter().withCustomConfig(config).build().start(); consulClient = new ConsulClient("127.0.0.1", consulServer.getHttpPort()); } @After public void afterEach() throws Exception { consulServer.close(); } @Test public void testAwsHosts() throws JSONException { List<String> tags = new ArrayList<>(); tags.add("cloud=aws"); tags.add("availability-zone=us-east-1b"); tags.add("datacenter=us-east-1"); NewService service = new NewService(); service.setName(APPLICATION_NAME); service.setTags(tags); consulClient.agentServiceRegister(service); NewCheck check = new NewCheck(); check.setName(APPLICATION_NAME); check.setScript("true"); check.setTtl("1m"); check.setInterval("30s"); consulClient.agentCheckRegister(check); consulClient.agentCheckPass(APPLICATION_NAME); ConsulHostsSupplier hostSupplier = new ConsulHostsSupplier(APPLICATION_NAME, consulClient); assertEquals(hostSupplier.getApplicationName(), APPLICATION_NAME); List<Host> hosts = hostSupplier.getHosts(); assertEquals(hosts.size(), 1); Host host = hosts.get(0); assertEquals(host.getRack(), "us-east-1b"); assertEquals(host.getDatacenter(), "us-east-1"); assertEquals(host.getHostName(), "127.0.0.1"); assertEquals(host.getIpAddress(), "127.0.0.1"); assertTrue(host.isUp()); } @Test public void testOtherCloudProviderHosts() throws JSONException { List<String> tags = new ArrayList<>(); tags.add("cloud=kubernetes"); tags.add("rack=rack1"); tags.add("datacenter=dc1"); NewService service = new NewService(); service.setName(APPLICATION_NAME); service.setTags(tags); consulClient.agentServiceRegister(service); NewCheck check = new NewCheck(); check.setName(APPLICATION_NAME); check.setScript("true"); check.setTtl("1m"); check.setInterval("30s"); consulClient.agentCheckRegister(check); consulClient.agentCheckPass(APPLICATION_NAME); ConsulHostsSupplier hostSupplier = new ConsulHostsSupplier(APPLICATION_NAME, consulClient); assertEquals(hostSupplier.getApplicationName(), APPLICATION_NAME); List<Host> hosts = hostSupplier.getHosts(); assertEquals(hosts.size(), 1); Host host = hosts.get(0); assertEquals(host.getRack(), "rack1"); assertEquals(host.getDatacenter(), "dc1"); assertEquals(host.getHostName(), "127.0.0.1"); assertEquals(host.getIpAddress(), "127.0.0.1"); assertTrue(host.isUp()); } }
5,956
0
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno/contrib/DynoCPMonitor.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.contrib; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.netflix.dyno.connectionpool.impl.CountingConnectionPoolMonitor; import com.netflix.servo.DefaultMonitorRegistry; import com.netflix.servo.annotations.DataSourceType; import com.netflix.servo.annotations.Monitor; import com.netflix.servo.monitor.Monitors; public class DynoCPMonitor extends CountingConnectionPoolMonitor { private static final Logger Logger = LoggerFactory.getLogger(DynoCPMonitor.class); public DynoCPMonitor(String namePrefix) { try { DefaultMonitorRegistry.getInstance().register(Monitors.newObjectMonitor(namePrefix, this)); } catch (Exception e) { Logger.warn("Failed to register metrics with monitor registry", e); } } @Monitor(name = "OperationSuccess", type = DataSourceType.COUNTER) @Override public long getOperationSuccessCount() { return super.getOperationSuccessCount(); } @Monitor(name = "OperationFailure", type = DataSourceType.COUNTER) @Override public long getOperationFailureCount() { return super.getOperationFailureCount(); } @Monitor(name = "ConnectionCreated", type = DataSourceType.COUNTER) @Override public long getConnectionCreatedCount() { return super.getConnectionCreatedCount(); } @Monitor(name = "ConnectionClosed", type = DataSourceType.COUNTER) @Override public long getConnectionClosedCount() { return super.getConnectionClosedCount(); } @Monitor(name = "ConnectionCreateFailed", type = DataSourceType.COUNTER) @Override public long getConnectionCreateFailedCount() { return super.getConnectionCreateFailedCount(); } @Monitor(name = "ConnectionBorrowed", type = DataSourceType.COUNTER) @Override public long getConnectionBorrowedCount() { return super.getConnectionBorrowedCount(); } @Monitor(name = "ConnectionBorrowedAvgLat", type = DataSourceType.GAUGE) @Override public long getConnectionBorrowedLatMean() { return super.getConnectionBorrowedLatMean(); } @Monitor(name = "ConnectionBorrowedLatP50", type = DataSourceType.GAUGE) @Override public long getConnectionBorrowedLatP50() { return super.getConnectionBorrowedLatP50(); } @Monitor(name = "ConnectionBorrowedLatP99", type = DataSourceType.GAUGE) @Override public long getConnectionBorrowedLatP99() { return super.getConnectionBorrowedLatP99(); } @Monitor(name = "ConnectionReturned", type = DataSourceType.COUNTER) @Override public long getConnectionReturnedCount() { return super.getConnectionReturnedCount(); } @Monitor(name = "PoolExhausted", type = DataSourceType.COUNTER) @Override public long getPoolExhaustedTimeoutCount() { return super.getPoolExhaustedTimeoutCount(); } @Monitor(name = "SocketTimeout", type = DataSourceType.COUNTER) @Override public long getSocketTimeoutCount() { return super.getSocketTimeoutCount(); } @Monitor(name = "OperationTimeout", type = DataSourceType.COUNTER) @Override public long getOperationTimeoutCount() { return super.getOperationTimeoutCount(); } @Monitor(name = "NumFailover", type = DataSourceType.COUNTER) @Override public long getFailoverCount() { return super.getFailoverCount(); } @Monitor(name = "ConnectionBusy", type = DataSourceType.COUNTER) @Override public long getNumBusyConnections() { return super.getNumBusyConnections(); } @Monitor(name = "ConnectionOpen", type = DataSourceType.COUNTER) @Override public long getNumOpenConnections() { return super.getNumOpenConnections(); } @Monitor(name = "NoHostCount", type = DataSourceType.COUNTER) @Override public long getNoHostCount() { return super.getNoHostCount(); } @Monitor(name = "UnknownError", type = DataSourceType.COUNTER) @Override public long getUnknownErrorCount() { return super.getUnknownErrorCount(); } @Monitor(name = "BadRequest", type = DataSourceType.COUNTER) @Override public long getBadRequestCount() { return super.getBadRequestCount(); } @Monitor(name = "HostCount", type = DataSourceType.GAUGE) @Override public long getHostCount() { return super.getHostCount(); } @Monitor(name = "HostUpCount", type = DataSourceType.GAUGE) @Override public long getHostUpCount() { return super.getHostUpCount(); } @Monitor(name = "HostDownCount", type = DataSourceType.GAUGE) @Override public long getHostDownCount() { return super.getHostDownCount(); } }
5,957
0
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno/contrib/ArchaiusConnectionPoolConfiguration.java
/******************************************************************************* * Copyright 2015 Netflix * * Licensed 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/ package com.netflix.dyno.contrib; import com.netflix.config.DynamicStringProperty; import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.netflix.config.DynamicBooleanProperty; import com.netflix.config.DynamicIntProperty; import com.netflix.config.DynamicPropertyFactory; import com.netflix.dyno.connectionpool.ErrorRateMonitorConfig; import com.netflix.dyno.connectionpool.RetryPolicy.RetryPolicyFactory; import com.netflix.dyno.connectionpool.impl.ConnectionPoolConfigurationImpl; import com.netflix.dyno.connectionpool.impl.RetryNTimes; import com.netflix.dyno.connectionpool.impl.RunOnce; public class ArchaiusConnectionPoolConfiguration extends ConnectionPoolConfigurationImpl { private static final Logger Logger = LoggerFactory.getLogger(ArchaiusConnectionPoolConfiguration.class); private static final String DynoPrefix = "dyno."; //private final DynamicIntProperty port; private final DynamicIntProperty maxConnsPerHost; private final DynamicIntProperty maxTimeoutWhenExhausted; private final DynamicIntProperty maxFailoverCount; private final DynamicIntProperty connectTimeout; private final DynamicIntProperty socketTimeout; private final DynamicBooleanProperty localZoneAffinity; private final DynamicIntProperty resetTimingsFrequency; private final DynamicStringProperty configPublisherConfig; private final DynamicIntProperty compressionThreshold; private final LoadBalancingStrategy loadBalanceStrategy; private final CompressionStrategy compressionStrategy; private final ErrorRateMonitorConfig errorRateConfig; private final RetryPolicyFactory retryPolicyFactory; private final DynamicBooleanProperty failOnStartupIfNoHosts; private final DynamicIntProperty lockVotingSize; private DynamicBooleanProperty isDualWriteEnabled; private DynamicStringProperty dualWriteClusterName; private DynamicIntProperty dualWritePercentage; public ArchaiusConnectionPoolConfiguration(String name) { super(name); String propertyPrefix = DynoPrefix + name; maxConnsPerHost = DynamicPropertyFactory.getInstance().getIntProperty(propertyPrefix + ".connection.maxConnsPerHost", super.getMaxConnsPerHost()); maxTimeoutWhenExhausted = DynamicPropertyFactory.getInstance().getIntProperty(propertyPrefix + ".connection.maxTimeoutWhenExhausted", super.getMaxTimeoutWhenExhausted()); maxFailoverCount = DynamicPropertyFactory.getInstance().getIntProperty(propertyPrefix + ".connection.maxFailoverCount", super.getMaxFailoverCount()); connectTimeout = DynamicPropertyFactory.getInstance().getIntProperty(propertyPrefix + ".connection.connectTimeout", super.getConnectTimeout()); socketTimeout = DynamicPropertyFactory.getInstance().getIntProperty(propertyPrefix + ".connection.socketTimeout", super.getSocketTimeout()); localZoneAffinity = DynamicPropertyFactory.getInstance().getBooleanProperty(propertyPrefix + ".connection.localZoneAffinity", super.localZoneAffinity()); resetTimingsFrequency = DynamicPropertyFactory.getInstance().getIntProperty(propertyPrefix + ".connection.metrics.resetFrequencySeconds", super.getTimingCountersResetFrequencySeconds()); configPublisherConfig = DynamicPropertyFactory.getInstance().getStringProperty(propertyPrefix + ".config.publisher.address", super.getConfigurationPublisherConfig()); failOnStartupIfNoHosts = DynamicPropertyFactory.getInstance().getBooleanProperty(propertyPrefix + ".config.startup.failIfNoHosts", super.getFailOnStartupIfNoHosts()); compressionThreshold = DynamicPropertyFactory.getInstance().getIntProperty(propertyPrefix + ".config.compressionThreshold", super.getValueCompressionThreshold()); lockVotingSize = DynamicPropertyFactory.getInstance().getIntProperty(propertyPrefix + ".config.lock.votingSize", super.getLockVotingSize()); loadBalanceStrategy = parseLBStrategy(propertyPrefix); errorRateConfig = parseErrorRateMonitorConfig(propertyPrefix); retryPolicyFactory = parseRetryPolicyFactory(propertyPrefix); compressionStrategy = parseCompressionStrategy(propertyPrefix); isDualWriteEnabled = DynamicPropertyFactory.getInstance().getBooleanProperty(propertyPrefix + ".dualwrite.enabled", super.isDualWriteEnabled()); dualWriteClusterName = DynamicPropertyFactory.getInstance().getStringProperty(propertyPrefix + ".dualwrite.cluster", super.getDualWriteClusterName()); dualWritePercentage = DynamicPropertyFactory.getInstance().getIntProperty(propertyPrefix + ".dualwrite.percentage", super.getDualWritePercentage()); } @Override public String getName() { return super.getName(); } @Override public int getMaxConnsPerHost() { return maxConnsPerHost.get(); } @Override public int getMaxTimeoutWhenExhausted() { return maxTimeoutWhenExhausted.get(); } @Override public int getMaxFailoverCount() { return maxFailoverCount.get(); } @Override public int getConnectTimeout() { return connectTimeout.get(); } @Override public int getSocketTimeout() { return socketTimeout.get(); } @Override public RetryPolicyFactory getRetryPolicyFactory() { return retryPolicyFactory; } @Override public boolean localZoneAffinity() { return localZoneAffinity.get(); } @Override public LoadBalancingStrategy getLoadBalancingStrategy() { return loadBalanceStrategy; } @Override public CompressionStrategy getCompressionStrategy() { return compressionStrategy; } @Override public int getValueCompressionThreshold() { return compressionThreshold.get(); } @Override public int getTimingCountersResetFrequencySeconds() { return resetTimingsFrequency.get(); } @Override public String getConfigurationPublisherConfig() { return configPublisherConfig.get(); } @Override public boolean getFailOnStartupIfNoHosts() { return failOnStartupIfNoHosts.get(); } @Override public boolean isDualWriteEnabled() { return isDualWriteEnabled.get(); } @Override public String getDualWriteClusterName() { return dualWriteClusterName.get(); } @Override public int getDualWritePercentage() { return dualWritePercentage.get(); } @Override public int getLockVotingSize() { return lockVotingSize.get(); } public void setIsDualWriteEnabled(DynamicBooleanProperty booleanProperty) { this.isDualWriteEnabled = booleanProperty; } public void setDualWriteClusterName(DynamicStringProperty stringProperty) { this.dualWriteClusterName = stringProperty; } public void setDualWritePercentage(DynamicIntProperty intProperty) { this.dualWritePercentage = intProperty; } @Override public String toString() { return "ArchaiusConnectionPoolConfiguration{" + "name=" + getName() + ", maxConnsPerHost=" + maxConnsPerHost + ", maxTimeoutWhenExhausted=" + maxTimeoutWhenExhausted + ", maxFailoverCount=" + maxFailoverCount + ", connectTimeout=" + connectTimeout + ", socketTimeout=" + socketTimeout + ", localZoneAffinity=" + localZoneAffinity + ", resetTimingsFrequency=" + resetTimingsFrequency + ", configPublisherConfig=" + configPublisherConfig + ", compressionThreshold=" + compressionThreshold + ", loadBalanceStrategy=" + loadBalanceStrategy + ", compressionStrategy=" + compressionStrategy + ", errorRateConfig=" + errorRateConfig + ", retryPolicyFactory=" + retryPolicyFactory + ", failOnStartupIfNoHosts=" + failOnStartupIfNoHosts + ", isDualWriteEnabled=" + isDualWriteEnabled + ", dualWriteClusterName=" + dualWriteClusterName + ", dualWritePercentage=" + dualWritePercentage + '}'; } private LoadBalancingStrategy parseLBStrategy(String propertyPrefix) { LoadBalancingStrategy defaultConfig = super.getLoadBalancingStrategy(); String cfg = DynamicPropertyFactory.getInstance().getStringProperty(propertyPrefix + ".lbStrategy", defaultConfig.name()).get(); LoadBalancingStrategy lb = null; try { lb = LoadBalancingStrategy.valueOf(cfg); } catch (Exception e) { Logger.warn("Unable to parse LoadBalancingStrategy: " + cfg + ", switching to default: " + defaultConfig.name()); lb = defaultConfig; } return lb; } private CompressionStrategy parseCompressionStrategy(String propertyPrefix) { CompressionStrategy defaultCompStrategy = super.getCompressionStrategy(); String cfg = DynamicPropertyFactory .getInstance() .getStringProperty(propertyPrefix + ".compressionStrategy", defaultCompStrategy.name()).get(); CompressionStrategy cs = null; try { cs = CompressionStrategy.valueOf(cfg); Logger.info("Dyno configuration: CompressionStrategy = " + cs.name()); } catch (IllegalArgumentException ex) { Logger.warn("Unable to parse CompressionStrategy: " + cfg + ", switching to default: " + defaultCompStrategy.name()); cs = defaultCompStrategy; } return cs; } private ErrorRateMonitorConfig parseErrorRateMonitorConfig(String propertyPrefix) { String errorRateConfig = DynamicPropertyFactory.getInstance().getStringProperty(propertyPrefix + ".errorRateConfig", null).get(); try { if (errorRateConfig == null) { return null; } // Classic format that is supported is json. JSONObject json = new JSONObject(errorRateConfig); int window = json.getInt("window"); int frequency = json.getInt("frequency"); int suppress = json.getInt("suppress"); ErrorRateMonitorConfigImpl configImpl = new ErrorRateMonitorConfigImpl(window, frequency, suppress); JSONArray thresholds = json.getJSONArray("thresholds"); for (int i = 0; i < thresholds.length(); i++) { JSONObject tConfig = thresholds.getJSONObject(i); int rps = tConfig.getInt("rps"); int seconds = tConfig.getInt("seconds"); int coverage = tConfig.getInt("coverage"); configImpl.addThreshold(rps, seconds, coverage); } return configImpl; } catch (Exception e) { Logger.warn("Failed to parse error rate config: " + errorRateConfig, e); } return new ErrorRateMonitorConfigImpl(); } private RetryPolicyFactory parseRetryPolicyFactory(String propertyPrefix) { String retryPolicy = DynamicPropertyFactory.getInstance().getStringProperty(propertyPrefix + ".retryPolicy", "RunOnce").get(); if (retryPolicy.equals("RunOnce")) { return new RunOnce.RetryFactory(); } if (retryPolicy.startsWith("RetryNTimes")) { String[] parts = retryPolicy.split(":"); if (parts.length < 2) { return new RunOnce.RetryFactory(); } try { int n = Integer.parseInt(parts[1]); boolean allowFallback = false; if (parts.length == 3) { allowFallback = Boolean.parseBoolean(parts[2]); } return new RetryNTimes.RetryFactory(n, allowFallback); } catch (Exception e) { return new RunOnce.RetryFactory(); } } return new RunOnce.RetryFactory(); } }
5,958
0
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno/contrib/ConnectionPoolConfigPublisherFactory.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.contrib; import com.netflix.dyno.connectionpool.ConnectionPoolConfiguration; import com.netflix.dyno.connectionpool.ConnectionPoolConfigurationPublisher; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; import org.slf4j.Logger; import java.util.Locale; /** * @author jcacciatore */ public class ConnectionPoolConfigPublisherFactory { private static final org.slf4j.Logger Logger = org.slf4j.LoggerFactory.getLogger(ConnectionPoolConfigPublisherFactory.class); public ConnectionPoolConfigurationPublisher createPublisher(String applicationName, String clusterName, ConnectionPoolConfiguration config) { if (config.getConfigurationPublisherConfig() != null) { try { JSONObject json = new JSONObject(config.getConfigurationPublisherConfig()); String vip = json.getString("vip"); if (vip != null) { String type = json.getString("type"); if (type != null) { ConnectionPoolConfigurationPublisher.PublisherType publisherType = ConnectionPoolConfigurationPublisher.PublisherType.valueOf(type.toUpperCase(Locale.ENGLISH)); if (ConnectionPoolConfigurationPublisher.PublisherType.ELASTIC == publisherType) { return new ElasticConnectionPoolConfigurationPublisher(applicationName, clusterName, vip, config); } } } } catch (JSONException e) { Logger.warn("Invalid json specified for config publisher: " + e.getMessage()); } } return null; } }
5,959
0
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno/contrib/DynoOPMonitor.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.contrib; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import com.netflix.dyno.connectionpool.OperationMonitor; import com.netflix.dyno.connectionpool.impl.utils.EstimatedHistogram; import com.netflix.dyno.contrib.EstimatedHistogramBasedCounter.EstimatedHistogramMean; import com.netflix.dyno.contrib.EstimatedHistogramBasedCounter.EstimatedHistogramPercentile; import com.netflix.servo.DefaultMonitorRegistry; import com.netflix.servo.monitor.BasicCounter; import com.netflix.servo.monitor.Counter; import com.netflix.servo.monitor.MonitorConfig; import com.netflix.servo.monitor.Monitors; import com.netflix.servo.tag.BasicTag; public class DynoOPMonitor implements OperationMonitor { private final ConcurrentHashMap<String, DynoOpCounter> counterMap = new ConcurrentHashMap<String, DynoOpCounter>(); private final ConcurrentHashMap<String, DynoTimingCounters> timerMap = new ConcurrentHashMap<String, DynoTimingCounters>(); private final String appName; public DynoOPMonitor(String applicationName) { appName = applicationName; } @Override public void recordLatency(String opName, long duration, TimeUnit unit) { getOrCreateTimers(opName).recordLatency(duration, unit); } @Override public void recordSuccess(String opName) { getOrCreateCounter(opName, false).incrementSuccess(); } @Override public void recordFailure(String opName, String reason) { getOrCreateCounter(opName, false).incrementFailure(); } @Override public void recordSuccess(String opName, boolean compressionEnabled) { getOrCreateCounter(opName, compressionEnabled).incrementSuccess(); } @Override public void recordFailure(String opName, boolean compressionEnabled, String reason) { getOrCreateCounter(opName, true).incrementFailure(); } private class DynoOpCounter { private final Counter success; private final Counter successCompressionEnabled; private final Counter failure; private final Counter failureCompressionEnabled; private DynoOpCounter(String appName, String opName) { success = getNewCounter("Dyno__" + appName + "__" + opName + "__SUCCESS", opName, "false"); successCompressionEnabled = getNewCounter("Dyno__" + appName + "__" + opName + "__SUCCESS", opName, "true"); failure = getNewCounter("Dyno__" + appName + "__" + opName + "__ERROR", opName, "false"); failureCompressionEnabled = getNewCounter("Dyno__" + appName + "__" + opName + "__ERROR", opName, "true"); } private void incrementSuccess() { success.increment(); } private void incrementFailure() { failure.increment(); } private BasicCounter getNewCounter(String metricName, String opName, String compressionEnabled) { MonitorConfig config = MonitorConfig.builder(metricName) .withTag(new BasicTag("dyno_op", opName)) .withTag(new BasicTag("compression_enabled", compressionEnabled)) .build(); return new BasicCounter(config); } } private DynoOpCounter getOrCreateCounter(String opName, boolean compressionEnabled) { String counterName = opName + "_" + compressionEnabled; DynoOpCounter counter = counterMap.get(counterName); if (counter != null) { return counter; } counter = new DynoOpCounter(appName, counterName); DynoOpCounter prevCounter = counterMap.putIfAbsent(counterName, counter); if (prevCounter != null) { return prevCounter; } DefaultMonitorRegistry.getInstance().register(counter.success); DefaultMonitorRegistry.getInstance().register(counter.failure); DefaultMonitorRegistry.getInstance().register(counter.successCompressionEnabled); DefaultMonitorRegistry.getInstance().register(counter.failureCompressionEnabled); return counter; } private class DynoTimingCounters { private final EstimatedHistogramMean latMean; private final EstimatedHistogramPercentile lat99; private final EstimatedHistogramPercentile lat995; private final EstimatedHistogramPercentile lat999; private final EstimatedHistogram estHistogram; private DynoTimingCounters(String appName, String opName) { estHistogram = new EstimatedHistogram(); latMean = new EstimatedHistogramMean("Dyno__" + appName + "__" + opName + "__latMean", opName, estHistogram); lat99 = new EstimatedHistogramPercentile("Dyno__" + appName + "__" + opName + "__lat990", opName, estHistogram, 0.99); lat995 = new EstimatedHistogramPercentile("Dyno__" + appName + "__" + opName + "__lat995", opName, estHistogram, 0.995); lat999 = new EstimatedHistogramPercentile("Dyno__" + appName + "__" + opName + "__lat999", opName, estHistogram, 0.999); } public void recordLatency(long duration, TimeUnit unit) { long durationMicros = TimeUnit.MICROSECONDS.convert(duration, unit); estHistogram.add(durationMicros); } } private DynoTimingCounters getOrCreateTimers(String opName) { DynoTimingCounters timer = timerMap.get(opName); if (timer != null) { return timer; } timer = new DynoTimingCounters(appName, opName); DynoTimingCounters prevTimer = timerMap.putIfAbsent(opName, timer); if (prevTimer != null) { return prevTimer; } DefaultMonitorRegistry.getInstance().register(timer.latMean); DefaultMonitorRegistry.getInstance().register(timer.lat99); DefaultMonitorRegistry.getInstance().register(timer.lat995); DefaultMonitorRegistry.getInstance().register(timer.lat999); return timer; } }
5,960
0
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno/contrib/EstimatedHistogramBasedCounter.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.contrib; import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.netflix.dyno.connectionpool.impl.utils.EstimatedHistogram; import com.netflix.servo.annotations.DataSourceType; import com.netflix.servo.monitor.AbstractMonitor; import com.netflix.servo.monitor.MonitorConfig; import com.netflix.servo.tag.BasicTag; public abstract class EstimatedHistogramBasedCounter extends AbstractMonitor<Number> { protected final EstimatedHistogram estHistogram; /** * Creates a new instance of the counter. */ public EstimatedHistogramBasedCounter(final String name, final String opName, final EstimatedHistogram histogram) { super(MonitorConfig.builder(name).build() .withAdditionalTag(DataSourceType.GAUGE) .withAdditionalTag(new BasicTag("dyno_op", opName))); this.estHistogram = histogram; } public EstimatedHistogramBasedCounter(final String name, final String opName, final String tagName, final EstimatedHistogram histogram) { super(MonitorConfig.builder(name).build() .withAdditionalTag(DataSourceType.GAUGE) .withAdditionalTag(new BasicTag(tagName, opName))); this.estHistogram = histogram; } /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof EstimatedHistogramBasedCounter)) { return false; } EstimatedHistogramBasedCounter m = (EstimatedHistogramBasedCounter) obj; return config.equals(m.getConfig()) && estHistogram.equals(m.estHistogram); } /** {@inheritDoc} */ @Override public int hashCode() { return Objects.hashCode(config, estHistogram.hashCode()); } /** {@inheritDoc} */ @Override public String toString() { return MoreObjects.toStringHelper(this) .add("config", config) .add("count", getValue()) .toString(); } public static class EstimatedHistogramMean extends EstimatedHistogramBasedCounter { public EstimatedHistogramMean(final String name, final String opName, final EstimatedHistogram histogram) { super(name, opName, histogram); } public EstimatedHistogramMean(final String name, final String opName, final String tagName, final EstimatedHistogram histogram) { super(name, opName, tagName, histogram); } @Override public Number getValue() { return estHistogram.mean(); } @Override public Number getValue(int pollerIndex) { return estHistogram.mean(); } public void add(long n) { this.estHistogram.add(n); } public void reset() { this.estHistogram.getBuckets(true); } } public static class EstimatedHistogramPercentile extends EstimatedHistogramBasedCounter { private final double percentile; public EstimatedHistogramPercentile(final String name, final String opName, final EstimatedHistogram histogram, double pVal) { super(name, opName, histogram); percentile = pVal; } public EstimatedHistogramPercentile(final String name, final String opName, final String tagName, final EstimatedHistogram histogram, double pVal) { super(name, opName, tagName, histogram); percentile = pVal; } @Override public Number getValue() { return estHistogram.percentile(percentile); } @Override public Number getValue(int pollerIndex) { return estHistogram.percentile(percentile); } } }
5,961
0
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno/contrib/ElasticConnectionPoolConfigurationPublisher.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.contrib; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.lang.reflect.Method; import java.net.URL; import java.net.URLClassLoader; import java.util.*; import org.apache.http.HttpResponse; import org.apache.http.StatusLine; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; import org.slf4j.LoggerFactory; import com.netflix.dyno.connectionpool.ConnectionPoolConfiguration; import com.netflix.dyno.connectionpool.ConnectionPoolConfigurationPublisher; /** * Publishes connection pool configuration information to an elastic cluster using elastic's REST interface. * * @author jcacciatore */ public class ElasticConnectionPoolConfigurationPublisher implements ConnectionPoolConfigurationPublisher { private static final org.slf4j.Logger Logger = LoggerFactory.getLogger(ElasticConnectionPoolConfigurationPublisher.class); private final String applicationName; private final String clusterName; private final String vip; private final ConnectionPoolConfiguration config; private static final String DESTINATION = "http://%s:7104/clientinfo/dyno"; public ElasticConnectionPoolConfigurationPublisher(String applicationName, String clusterName, String vip, ConnectionPoolConfiguration config) { this.applicationName = applicationName; this.clusterName = clusterName; this.vip = vip; this.config = config; } /** * See {@link ConnectionPoolConfigurationPublisher#publish()} */ @Override public void publish() { try { String destination = String.format(DESTINATION, vip); executePost(destination, createJsonFromConfig(config)); } catch (JSONException e) { /* forget it */ } } JSONObject createJsonFromConfig(ConnectionPoolConfiguration config) throws JSONException { if (config == null) { throw new IllegalArgumentException("Valid ConnectionPoolConfiguration instance is required"); } JSONObject json = new JSONObject(); json.put("ApplicationName", applicationName); json.put("DynomiteClusterName", clusterName); Method[] methods = config.getClass().getMethods(); for (Method method : methods) { if (method.getName().startsWith("get")) { Class<?> ret = method.getReturnType(); if (ret.isPrimitive() || ret == java.lang.String.class) { try { json.put(method.getName().substring(3), method.invoke(config)); } catch (ReflectiveOperationException ex) { /* forget it */ } } } } // jar version Set<String> jars = new HashSet<String>() {{ add("dyno-core"); add("dyno-contrib"); add("dyno-jedis"); add("dyno-reddison"); }}; json.put("Versions", new JSONObject(getLibraryVersion(this.getClass(), jars))); return json; } /** * * @param destination * @param jsonObject */ void executePost(String destination, JSONObject jsonObject) { DefaultHttpClient httpclient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(destination); try { StringEntity entity = new StringEntity(jsonObject.toString()); httpPost.setEntity(entity); HttpResponse response = httpclient.execute(httpPost); StatusLine statusLine = response.getStatusLine(); if (statusLine != null) { if (200 >= statusLine.getStatusCode() && statusLine.getStatusCode() < 300) { Logger.info("successfully published runtime data to " + DESTINATION); } else { Logger.info(String.format("unable to publish runtime data: %d %s ", statusLine.getStatusCode(), statusLine.getReasonPhrase())); } } } catch (UnsupportedEncodingException ue) { Logger.warn("Unable to create entity to post from json " + jsonObject.toString()); } catch (IOException e) { Logger.warn("Unable to post configuration data to elastic cluster: " + destination); } catch (Throwable th) { Logger.warn("Unable to post configuration data to elastic cluster:" + th.getMessage()); } finally { httpPost.releaseConnection(); } } /** * Get library version by iterating through the classloader jar list and obtain the name from the jar filename. * This will not open the library jar files. * <p> * This function assumes the conventional jar naming format and relies on the dash character to separate the * name of the jar from the version. For example, foo-bar-baz-1.0.12-CANDIDATE. * * @param libraryNames unique list of library names, i.e. "dyno-core" * @param classLoadedWithURLClassLoader For this to work, must have a URL based classloader * This has been tested to be the case in Tomcat (WebAppClassLoader) and basic J2SE classloader * @return the version of the library (everything between library name, dash, and .jar) */ Map<String, String> getLibraryVersion(Class<?> classLoadedWithURLClassLoader, Set<String> libraryNames) { ClassLoader cl = classLoadedWithURLClassLoader.getClassLoader(); Map<String, String> libraryVersionMapping = new HashMap<String, String>(); if (cl instanceof URLClassLoader) { @SuppressWarnings("resource") URLClassLoader uCl = (URLClassLoader) cl; URL urls[] = uCl.getURLs(); for (URL url : urls) { String fullNameWithVersion = url.toString().substring(url.toString().lastIndexOf('/')); if (fullNameWithVersion.length() > 4) { // all entries we attempt to parse must end in ".jar" String nameWithVersion = fullNameWithVersion.substring(1, fullNameWithVersion.length() - 4); int idx = findVersionStartIndex(nameWithVersion); if (idx > 0) { String name = nameWithVersion.substring(0, idx - 1); if (libraryNames.contains(name)) { libraryVersionMapping.put(name, nameWithVersion.substring(idx)); } } } } } return libraryVersionMapping; } Map<String, String> getLibraryVersion(Class<?> classLoadedWithURLClassLoader, String... libraryNames) { return getLibraryVersion(classLoadedWithURLClassLoader, new HashSet<String>(Arrays.asList(libraryNames))); } int findVersionStartIndex(String nameWithVersion) { if (nameWithVersion != null) { char[] chars = nameWithVersion.toCharArray(); for (int i = 0; i < chars.length; i++) { if (chars[i] == '-') { if (i < chars.length && Character.isDigit(chars[i + 1])) { return i + 1; } } } } return -1; } }
5,962
0
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno/contrib/EurekaHostsSupplier.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.contrib; import java.util.ArrayList; import java.util.List; import com.netflix.dyno.connectionpool.HostBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.base.Supplier; import com.google.common.collect.Collections2; import com.google.common.collect.Lists; import com.netflix.appinfo.AmazonInfo; import com.netflix.appinfo.AmazonInfo.MetaDataKey; import com.netflix.appinfo.InstanceInfo; import com.netflix.appinfo.InstanceInfo.InstanceStatus; import com.netflix.discovery.DiscoveryClient; import com.netflix.discovery.DiscoveryManager; import com.netflix.discovery.EurekaClient; import com.netflix.discovery.shared.Application; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.HostSupplier; /** * Simple class that implements {@link Supplier}<{@link List}<{@link Host}>>. It provides a List<{@link Host}> * using the {@link DiscoveryManager} which is the eureka client. * * Note that the class needs the eureka application name to discover all instances for that application. * * @author poberai */ public class EurekaHostsSupplier implements HostSupplier { private static final Logger Logger = LoggerFactory.getLogger(EurekaHostsSupplier.class); // The Dynomite cluster name for discovering nodes private final String applicationName; private final EurekaClient discoveryClient; @Deprecated public EurekaHostsSupplier(String applicationName, DiscoveryClient dClient) { this.applicationName = applicationName.toUpperCase(); this.discoveryClient = dClient; } public EurekaHostsSupplier(String applicationName, EurekaClient dClient) { this.applicationName = applicationName.toUpperCase(); this.discoveryClient = dClient; } public static EurekaHostsSupplier newInstance(String applicationName, EurekaHostsSupplier hostsSupplier) { return new EurekaHostsSupplier(applicationName, hostsSupplier.getDiscoveryClient()); } @Override public List<Host> getHosts() { return getUpdateFromEureka(); } private List<Host> getUpdateFromEureka() { if (discoveryClient == null) { Logger.error("Discovery client cannot be null"); throw new RuntimeException("EurekaHostsSupplier needs a non-null DiscoveryClient"); } Logger.info("Dyno fetching instance list for app: " + applicationName); Application app = discoveryClient.getApplication(applicationName); List<Host> hosts = new ArrayList<Host>(); if (app == null) { return hosts; } List<InstanceInfo> ins = app.getInstances(); if (ins == null || ins.isEmpty()) { return hosts; } hosts = Lists.newArrayList(Collections2.transform(ins, info -> { Host.Status status = info.getStatus() == InstanceStatus.UP ? Host.Status.Up : Host.Status.Down; String rack = null; try { if (info.getDataCenterInfo() instanceof AmazonInfo) { AmazonInfo amazonInfo = (AmazonInfo) info.getDataCenterInfo(); rack = amazonInfo.get(MetaDataKey.availabilityZone); } } catch (Throwable t) { Logger.error("Error getting rack for host " + info.getHostName(), t); } if (rack == null) { Logger.error("Rack wasn't found for host:" + info.getHostName() + " there may be issues matching it up to the token map"); } Host host = new HostBuilder().setHostname(info.getHostName()).setIpAddress(info.getIPAddr()).setRack(rack).setStatus(status).createHost(); return host; })); Logger.info("Dyno found hosts from eureka - num hosts: " + hosts.size()); return hosts; } @Override public String toString() { return EurekaHostsSupplier.class.getName(); } public String getApplicationName() { return applicationName; } public EurekaClient getDiscoveryClient() { return discoveryClient; } }
5,963
0
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno/contrib
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno/contrib/consul/ConsulHelper.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.contrib.consul; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang3.StringUtils; import com.ecwid.consul.v1.health.model.HealthService; /** * * Class with support for consul simple/commons operations */ public class ConsulHelper { public static String findHost(HealthService healthService) { HealthService.Service service = healthService.getService(); HealthService.Node node = healthService.getNode(); if (StringUtils.isNotBlank(service.getAddress())) { return service.getAddress(); } else if (StringUtils.isNotBlank(node.getAddress())) { return node.getAddress(); } return node.getNode(); } public static Map<String, String> getMetadata(HealthService healthService) { return getMetadata(healthService.getService().getTags()); } public static Map<String, String> getMetadata(List<String> tags) { LinkedHashMap<String, String> metadata = new LinkedHashMap<>(); if (tags != null) { for (String tag : tags) { String[] parts = StringUtils.split(tag, "="); switch (parts.length) { case 0: break; case 1: metadata.put(parts[0], parts[0]); break; case 2: metadata.put(parts[0], parts[1]); break; default: String[] end = Arrays.copyOfRange(parts, 1, parts.length); metadata.put(parts[0], StringUtils.join(end, "=")); break; } } } return metadata; } }
5,964
0
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno/contrib
Create_ds/dyno/dyno-contrib/src/main/java/com/netflix/dyno/contrib/consul/ConsulHostsSupplier.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.contrib.consul; import com.ecwid.consul.v1.ConsulClient; import com.ecwid.consul.v1.QueryParams; import com.ecwid.consul.v1.Response; import com.ecwid.consul.v1.health.model.Check; import com.ecwid.consul.v1.health.model.HealthService; import com.google.common.base.Function; import com.google.common.base.Supplier; import com.google.common.collect.Collections2; import com.google.common.collect.Lists; import com.netflix.discovery.DiscoveryManager; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.HostBuilder; import com.netflix.dyno.connectionpool.HostSupplier; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * Simple class that implements {@link Supplier}<{@link List}<{@link Host}>>. It provides a List<{@link Host}> * using the {@link DiscoveryManager} which is the consul client. * * Note that the class needs the consul application name to discover all instances for that application. * * Example of register at consul * curl -X PUT http://localhost:8500/v1/agent/service/register -d "{ \"ID\": \"dynomite-8102\", \"Name\": \"dynomite\", \"Tags\": [\"datacenter=dc\",\"cloud=openstack\",\"rack=dc-rack\"], \"Address\": \"127.0.0.2\", \"Port\": 8102, \"Check\": { \"Interval\": \"10s\", \"HTTP\": \"http://127.0.0.1:22222/ping\" }}" * * @author tiodollar */ public class ConsulHostsSupplier implements HostSupplier { private static final Logger Logger = LoggerFactory.getLogger(ConsulHostsSupplier.class); // The Dynomite cluster name for discovering nodes private final String applicationName; private final ConsulClient discoveryClient; public ConsulHostsSupplier(String applicationName, ConsulClient discoveryClient) { this.applicationName = applicationName; this.discoveryClient = discoveryClient; } public static ConsulHostsSupplier newInstance(String applicationName, ConsulHostsSupplier hostsSupplier) { return new ConsulHostsSupplier(applicationName, hostsSupplier.getDiscoveryClient()); } @Override public List<Host> getHosts() { return getUpdateFromConsul(); } private List<Host> getUpdateFromConsul() { if (discoveryClient == null) { Logger.error("Discovery client cannot be null"); throw new RuntimeException("ConsulHostsSupplier needs a non-null DiscoveryClient"); } Logger.info("Dyno fetching instance list for app: " + applicationName); Response<List<HealthService>> services = discoveryClient.getHealthServices(applicationName, false, QueryParams.DEFAULT); List<HealthService> app = services.getValue(); List<Host> hosts = new ArrayList<Host>(); if (app != null && app.size() < 0) { return hosts; } hosts = Lists.newArrayList(Collections2.transform(app, new Function<HealthService, Host>() { @Override public Host apply(HealthService info) { String hostName = ConsulHelper.findHost(info); Map<String, String> metaData = ConsulHelper.getMetadata(info); Host.Status status = Host.Status.Up; for (com.ecwid.consul.v1.health.model.Check check : info.getChecks()) { if (check.getStatus() == Check.CheckStatus.CRITICAL) { status = Host.Status.Down; break; } } String rack = null; try { if (metaData.containsKey("cloud") && StringUtils.equals(metaData.get("cloud"), "aws")) { rack = metaData.get("availability-zone"); } else { rack = metaData.get("rack"); } } catch (Throwable t) { Logger.error("Error getting rack for host " + info.getNode(), t); } if (rack == null) { Logger.error("Rack wasn't found for host:" + info.getNode() + " there may be issues matching it up to the token map"); } Host host = new HostBuilder().setHostname(hostName) .setIpAddress(hostName) .setPort(info.getService().getPort()) .setRack(rack) .setDatacenter(String.valueOf(metaData.get("datacenter"))) .setStatus(status) .createHost(); return host; } })); Logger.info("Dyno found hosts from consul - num hosts: " + hosts.size()); return hosts; } @Override public String toString() { return ConsulHostsSupplier.class.getName(); } public String getApplicationName() { return applicationName; } public ConsulClient getDiscoveryClient() { return discoveryClient; } }
5,965
0
Create_ds/dyno/dyno-demo/src/main/java/com/netflix/dyno/demo
Create_ds/dyno/dyno-demo/src/main/java/com/netflix/dyno/demo/redis/DynoJedisDemo.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.demo.redis; import com.google.common.collect.Lists; import com.google.gson.Gson; import com.netflix.dyno.connectionpool.CursorBasedResult; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.Host.Status; import com.netflix.dyno.connectionpool.HostBuilder; import com.netflix.dyno.connectionpool.HostSupplier; import com.netflix.dyno.connectionpool.OperationResult; import com.netflix.dyno.connectionpool.TokenMapSupplier; import com.netflix.dyno.connectionpool.exception.PoolOfflineException; import com.netflix.dyno.connectionpool.impl.ConnectionPoolConfigurationImpl; import com.netflix.dyno.connectionpool.impl.lb.HostToken; import com.netflix.dyno.contrib.ArchaiusConnectionPoolConfiguration; import com.netflix.dyno.jedis.DynoJedisClient; import com.netflix.dyno.jedis.DynoJedisPipeline; import com.netflix.dyno.recipes.json.DynoJedisJsonClient; import com.netflix.dyno.recipes.json.JsonPath; import com.netflix.dyno.recipes.lock.DynoLockClient; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Option; import org.apache.commons.cli.OptionGroup; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.DefaultHttpClient; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; import redis.clients.jedis.Response; import redis.clients.jedis.ScanParams; import redis.clients.jedis.ScanResult; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Random; import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; public class DynoJedisDemo { private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DynoJedisDemo.class); public static final String randomValue = "dcfa7d0973834e5c9f480b65de19d684dcfa7d097383dcfa7d0973834e5c9f480b65de19d684dcfa7d097383dcfa7d0973834e5c9f480b65de19d684dcfa7d097383dcfa7d0973834e5c9f480b65de19d684dcfa7d097383"; protected DynoJedisClient client; protected DynoJedisClient shadowClusterClient; private DynoLockClient dynoLockClient; protected int numKeys; protected final String localRack; protected final String clusterName; protected final String shadowClusterName; public DynoJedisDemo(String clusterName, String localRack) { this(clusterName, null, localRack); } public DynoJedisDemo(String primaryCluster, String shadowCluster, String localRack) { this.clusterName = primaryCluster; this.shadowClusterName = shadowCluster; this.localRack = localRack; } public void initWithLocalHost(boolean initLock) throws Exception { final int port = 6379; final HostSupplier localHostSupplier = new HostSupplier() { final Host hostSupplierHost = new HostBuilder().setHostname("localhost").setRack(localRack).setDatastorePort(6379).setStatus(Status.Up).createHost(); @Override public List<Host> getHosts() { return Collections.singletonList(hostSupplierHost); } }; final TokenMapSupplier tokenSupplier = new TokenMapSupplier() { final Host tokenHost = new HostBuilder().setHostname("localhost").setPort(port).setDatastorePort(6379).setRack(localRack).setStatus(Status.Up).createHost(); final HostToken localHostToken = new HostToken(100000L, tokenHost); @Override public List<HostToken> getTokens(Set<Host> activeHosts) { return Collections.singletonList(localHostToken); } @Override public HostToken getTokenForHost(Host host, Set<Host> activeHosts) { return localHostToken; } }; if (initLock) initDynoLockClient(localHostSupplier, tokenSupplier, "test", "test"); else init(localHostSupplier, port, tokenSupplier); } private void initWithRemoteCluster(String clusterName, final List<Host> hosts, final int port, boolean lock) throws Exception { final HostSupplier clusterHostSupplier = () -> hosts; if (lock) initDynoLockClient(clusterHostSupplier, null, "test", clusterName); else init(clusterHostSupplier, port, null); } public void initWithRemoteClusterFromFile(final String filename, final int port, boolean lock) throws Exception { initWithRemoteCluster(null, readHostsFromFile(filename, port), port, lock); } public void initWithRemoteClusterFromEurekaUrl(final String clusterName, final int port, boolean lock) throws Exception { initWithRemoteCluster(clusterName, getHostsFromDiscovery(clusterName), port, lock); } public void initDualClientWithRemoteClustersFromFile(final String primaryHostsFile, final String shadowHostsFile, final int port) throws Exception { final HostSupplier primaryClusterHostSupplier = () -> { try { return readHostsFromFile(primaryHostsFile, port); } catch (Exception e) { e.printStackTrace(); } return null; }; final HostSupplier shadowClusterHostSupplier = () -> { try { return readHostsFromFile(shadowHostsFile, port); } catch (Exception e) { e.printStackTrace(); } return null; }; initDualWriterDemo(primaryClusterHostSupplier, shadowClusterHostSupplier, null, null); } public void initDualClientWithRemoteClustersFromEurekaUrl(final String primaryClusterName, final String shadowClusterName) { final HostSupplier primaryClusterHostSupplier = () -> getHostsFromDiscovery(primaryClusterName); final HostSupplier shadowClusterHostSupplier = () -> getHostsFromDiscovery(shadowClusterName); initDualWriterDemo(primaryClusterHostSupplier, shadowClusterHostSupplier, null, null); } public void initDualWriterDemo(HostSupplier primaryClusterHostSupplier, HostSupplier shadowClusterHostSupplier, TokenMapSupplier primaryTokenSupplier, TokenMapSupplier shadowTokenSupplier) { this.client = new DynoJedisClient.Builder() .withApplicationName("demo") .withDynomiteClusterName("dyno-dev") .withHostSupplier(primaryClusterHostSupplier) .withDualWriteHostSupplier(shadowClusterHostSupplier) .withTokenMapSupplier(primaryTokenSupplier) .withDualWriteTokenMapSupplier(shadowTokenSupplier) .build(); ConnectionPoolConfigurationImpl shadowCPConfig = new ArchaiusConnectionPoolConfiguration(shadowClusterName); this.shadowClusterClient = new DynoJedisClient.Builder() .withApplicationName("demo") .withDynomiteClusterName("dyno-dev") .withHostSupplier(shadowClusterHostSupplier) .withTokenMapSupplier(shadowTokenSupplier) .withCPConfig(shadowCPConfig) .build(); } public void init(HostSupplier hostSupplier, int port, TokenMapSupplier tokenSupplier) throws Exception { client = new DynoJedisClient.Builder().withApplicationName("demo").withDynomiteClusterName("dyno_dev") .withHostSupplier(hostSupplier) .withTokenMapSupplier(tokenSupplier) // .withCPConfig( // new ConnectionPoolConfigurationImpl("demo") // .setCompressionStrategy(ConnectionPoolConfiguration.CompressionStrategy.THRESHOLD) // .setCompressionThreshold(2048) // .setLocalRack(this.localRack) // ) .build(); } public void initDynoLockClient(HostSupplier hostSupplier, TokenMapSupplier tokenMapSupplier, String appName, String clusterName) { dynoLockClient = new DynoLockClient.Builder().withApplicationName(appName) .withDynomiteClusterName(clusterName) .withTimeoutUnit(TimeUnit.MILLISECONDS) .withTimeout(10000) .withHostSupplier(hostSupplier) .withTokenMapSupplier(tokenMapSupplier).build(); } public void runSimpleTest() throws Exception { this.numKeys = 10; System.out.println("Simple test selected"); // write for (int i = 0; i < numKeys; i++) { System.out.println("Writing key/value => DynoClientTest-" + i + " / " + i); client.set("DynoClientTest-" + i, "" + i); } // read for (int i = 0; i < numKeys; i++) { OperationResult<String> result = client.d_get("DynoClientTest-" + i); System.out.println("Reading Key: " + i + ", Value: " + result.getResult() + " " + result.getNode()); } // read from shadow cluster if (shadowClusterClient != null) { // read for (int i = 0; i < numKeys; i++) { OperationResult<String> result = shadowClusterClient.d_get("DynoClientTest-" + i); System.out.println("Reading Key: " + i + ", Value: " + result.getResult() + " " + result.getNode()); } } } public void runSimpleDualWriterPipelineTest() { this.numKeys = 10; System.out.println("Simple Dual Writer Pipeline test selected"); // write DynoJedisPipeline pipeline = client.pipelined(); for (int i = 0; i < numKeys; i++) { System.out.println("Writing key/value => DynoClientTest/" + i); pipeline.hset("DynoClientTest", "DynoClientTest-" + i, "" + i); } pipeline.sync(); // new pipeline pipeline = client.pipelined(); for (int i = 0; i < numKeys; i++) { System.out.println("Writing key/value => DynoClientTest-1/" + i); pipeline.hset("DynoClientTest-1", "DynoClientTest-" + i, "" + i); } pipeline.sync(); // read System.out.println("Reading keys from dual writer pipeline client"); for (int i = 0; i < numKeys; i++) { OperationResult<String> result = client.d_hget("DynoClientTest", "DynoClientTest-" + i); System.out.println("Reading Key: DynoClientTest/" + i + ", Value: " + result.getResult() + " " + result.getNode()); result = client.d_hget("DynoClientTest-1", "DynoClientTest-" + i); System.out.println("Reading Key: DynoClientTest-1/" + i + ", Value: " + result.getResult() + " " + result.getNode()); } // read from shadow cluster System.out.println("Reading keys from shadow Jedis client"); if (shadowClusterClient != null) { // read for (int i = 0; i < numKeys; i++) { OperationResult<String> result = shadowClusterClient.d_hget("DynoClientTest", "DynoClientTest-" + i); System.out.println("Reading Key: DynoClientTest/" + i + ", Value: " + result.getResult() + " " + result.getNode()); result = shadowClusterClient.d_hget("DynoClientTest-1", "DynoClientTest-" + i); System.out.println("Reading Key: DynoClientTest-1/" + i + ", Value: " + result.getResult() + " " + result.getNode()); } } try { pipeline.close(); } catch (Throwable t) { t.printStackTrace(); } } /** * This tests covers the use of binary keys * * @throws Exception */ public void runBinaryKeyTest() throws Exception { System.out.println("Binary Key test selected"); byte[] videoInt = ByteBuffer.allocate(4).putInt(new Integer(100)).array(); byte[] locInt = ByteBuffer.allocate(4).putInt(new Integer(200)).array(); byte[] overallKey = new byte[videoInt.length + locInt.length]; byte[] firstWindow = ByteBuffer.allocate(4).putFloat(new Float(1.25)).array(); byte[] secondWindow = ByteBuffer.allocate(4).putFloat(new Float(1.5)).array(); byte[] thirdWindow = ByteBuffer.allocate(4).putFloat(new Float(1.75)).array(); byte[] fourthWindow = ByteBuffer.allocate(4).putFloat(new Float(2.0)).array(); byte[] overallVal = new byte[firstWindow.length + secondWindow.length + thirdWindow.length + fourthWindow.length]; byte[] newKey = new byte[videoInt.length + locInt.length]; // write client.set(overallKey, overallVal); System.out.println("Writing Key: " + new String(overallKey, Charset.forName("UTF-8"))); // read OperationResult<byte[]> result = client.d_get(newKey); System.out.println("Reading Key: " + new String(newKey, Charset.forName("UTF-8")) + ", Value: " + result.getResult().toString() + " " + result.getNode()); } /** * To run this test, the hashtag FP must be set on the Dynomite cluster. The * assumed hashtag for this test is {} hence each key is foo-{<String>}. To * validate that this test succeeds observe the cluster manually. * * @throws Exception */ public void runSimpleTestWithHashtag() throws Exception { this.numKeys = 100; System.out.println("Simple test with hashtag selected"); // write for (int i = 0; i < numKeys; i++) { System.out.println("Writing key/value => DynoClientTest-" + i + " / " + i); client.set(i + "-{bar}", " " + i); } // read for (int i = 0; i < numKeys; i++) { OperationResult<String> result = client.d_get(i + "-{bar}"); System.out.println( "Reading Key: " + i + "-{bar}" + " , Value: " + result.getResult() + " " + result.getNode()); } } public void runPipelineEmptyResult() throws Exception { DynoJedisPipeline pipeline = client.pipelined(); DynoJedisPipeline pipeline2 = client.pipelined(); try { byte[] field1 = "field1".getBytes(); byte[] field2 = "field2".getBytes(); pipeline.hset("myHash".getBytes(), field1, "hello".getBytes()); pipeline.hset("myHash".getBytes(), field2, "world".getBytes()); Thread.sleep(1000); Response<List<byte[]>> result = pipeline.hmget("myHash".getBytes(), field1, field2, "miss".getBytes()); pipeline.sync(); System.out.println("TEST-1: hmget for 2 valid results and 1 non-existent field"); for (int i = 0; i < result.get().size(); i++) { byte[] val = result.get().get(i); if (val != null) { System.out.println("TEST-1:Result => " + i + ") " + new String(val)); } else { System.out.println("TEST-1:Result => " + i + ") " + val); } } } catch (Exception e) { pipeline.discardPipelineAndReleaseConnection(); throw e; } try { Response<List<byte[]>> result2 = pipeline2.hmget("foo".getBytes(), "miss1".getBytes(), "miss2".getBytes()); pipeline2.sync(); System.out.println("TEST-2: hmget when all fields (3) are not present in the hash"); if (result2.get() == null) { System.out.println("TEST-2: result is null"); } else { for (int i = 0; i < result2.get().size(); i++) { System.out.println("TEST-2:" + Arrays.toString(result2.get().get(i))); } } } catch (Exception e) { pipeline.discardPipelineAndReleaseConnection(); throw e; } } public void runKeysTest() throws Exception { System.out.println("Writing 10,000 keys to dynomite..."); for (int i = 0; i < 500; i++) { client.set("DynoClientTest_KEYS-TEST-key" + i, "value-" + i); } System.out.println("finished writing 10000 keys, querying for keys(\"DynoClientTest_KYES-TEST*\")"); Set<String> result = client.keys("DynoClientTest_KEYS-TEST*"); System.out.println("Got " + result.size() + " results, below"); System.out.println(result); } public void runScanTest(boolean populateKeys) throws Exception { logger.info("SCAN TEST -- begin"); final String keyPattern = System.getProperty("dyno.demo.scan.key.pattern", "DynoClientTest_key-*"); final String keyPrefix = System.getProperty("dyno.demo.scan.key.prefix", "DynoClientTest_key-"); if (populateKeys) { logger.info("Writing 500 keys to {} with prefix {}", this.clusterName, keyPrefix); for (int i = 0; i < 500; i++) { client.set(keyPrefix + i, "value-" + i); } } logger.info("Reading keys from {} with pattern {}", this.clusterName, keyPattern); CursorBasedResult<String> cbi = null; long start = System.currentTimeMillis(); int count = 0; do { try { cbi = client.dyno_scan(cbi, 5, keyPattern); } catch (PoolOfflineException ex) { logger.info("Caught exception.... retrying scan"); cbi = null; continue; } List<String> results = cbi.getStringResult(); count += results.size(); int i = 0; for (String res : results) { logger.info("{}) {}", i, res); i++; } } while ((cbi == null) || !cbi.isComplete()); long end = System.currentTimeMillis(); logger.info("SCAN TEST -- done {} results in {}ms", count, end - start); } public void runSScanTest(boolean populateKeys) throws Exception { logger.info("SET SCAN TEST -- begin"); final String key = "DynoClientTest_Set"; if (populateKeys) { logger.info("Populating set in cluster {} with key {}", this.clusterName, key); for (int i = 0; i < 50; i++) { client.sadd(key, "value-" + i); } } logger.info("Reading members of set from cluster {} with key {}", this.clusterName, key); ScanResult<String> scanResult; final Set<String> matches = new HashSet<>(); String cursor = "0"; do { final ScanParams scanParams = new ScanParams().count(10); scanParams.match("*"); scanResult = client.sscan(key, cursor, scanParams); matches.addAll(scanResult.getResult()); cursor = scanResult.getCursor(); if ("0".equals(cursor)) { break; } } while (true); logger.info("SET SCAN TEST -- done"); } public void cleanup(int nKeys) throws Exception { // writes for initial seeding for (int i = 0; i < nKeys; i++) { System.out.println("Deleting : " + i); client.del("DynoDemoTest" + i); } } public void runMultiThreaded() throws Exception { this.runMultiThreaded(1000, true, 2, 2); } public void runMultiThreaded(final int items, boolean doSeed, final int numReaders, final int numWriters) throws Exception { final int nKeys = items; if (doSeed) { // writes for initial seeding for (int i = 0; i < nKeys; i++) { System.out.println("Writing : " + i); client.set("DynoDemoTest" + i, "" + i); } } final int nThreads = numReaders + numWriters + 1; final ExecutorService threadPool = Executors.newFixedThreadPool(nThreads); final AtomicBoolean stop = new AtomicBoolean(false); final CountDownLatch latch = new CountDownLatch(nThreads); final AtomicInteger success = new AtomicInteger(0); final AtomicInteger failure = new AtomicInteger(0); final AtomicInteger emptyReads = new AtomicInteger(0); startWrites(nKeys, numWriters, threadPool, stop, latch, success, failure); startReads(nKeys, numReaders, threadPool, stop, latch, success, failure, emptyReads); threadPool.submit(new Callable<Void>() { @Override public Void call() throws Exception { while (!stop.get()) { System.out.println("Success: " + success.get() + ", failure: " + failure.get() + ", emptyReads: " + emptyReads.get()); Thread.sleep(1000); } latch.countDown(); return null; } }); Thread.sleep(15 * 1000); stop.set(true); latch.await(); threadPool.shutdownNow(); executePostRunActions(); System.out.println("Cleaning up keys"); cleanup(nKeys); System.out.println("FINAL RESULT \nSuccess: " + success.get() + ", failure: " + failure.get() + ", emptyReads: " + emptyReads.get()); } protected void executePostRunActions() { // nothing to do here } protected void startWrites(final int nKeys, final int numWriters, final ExecutorService threadPool, final AtomicBoolean stop, final CountDownLatch latch, final AtomicInteger success, final AtomicInteger failure) { for (int i = 0; i < numWriters; i++) { threadPool.submit(new Callable<Void>() { final Random random = new Random(); @Override public Void call() throws Exception { while (!stop.get()) { int key = random.nextInt(nKeys); int value = random.nextInt(nKeys); try { client.set("DynoDemoTest" + key, "" + value); success.incrementAndGet(); } catch (Exception e) { System.out.println("WRITE FAILURE: " + e.getMessage()); failure.incrementAndGet(); } } latch.countDown(); return null; } }); } } protected void startReads(final int nKeys, final int numReaders, final ExecutorService threadPool, final AtomicBoolean stop, final CountDownLatch latch, final AtomicInteger success, final AtomicInteger failure, final AtomicInteger emptyReads) { for (int i = 0; i < numReaders; i++) { threadPool.submit(new Callable<Void>() { final Random random = new Random(); @Override public Void call() throws Exception { while (!stop.get()) { int key = random.nextInt(nKeys); try { String value = client.get("DynoDemoTest" + key); success.incrementAndGet(); if (value == null || value.isEmpty()) { emptyReads.incrementAndGet(); } } catch (Exception e) { System.out.println("READ FAILURE: " + e.getMessage()); failure.incrementAndGet(); } } latch.countDown(); return null; } }); } } public void stop() { if (client != null) { client.stopClient(); } } private List<Host> readHostsFromFile(String filename, int port) throws Exception { List<Host> hosts = new ArrayList<Host>(); File file = new File(filename); BufferedReader reader = new BufferedReader(new FileReader(file)); try { String line = null; while ((line = reader.readLine()) != null) { if (line.trim().isEmpty()) { continue; } String[] parts = line.trim().split(" "); if (parts.length != 2) { throw new RuntimeException("Bad data format in file:" + line); } Host host = new HostBuilder().setHostname(parts[0].trim()).setPort(port).setRack(parts[1].trim()).setStatus(Status.Up).createHost(); hosts.add(host); } } finally { reader.close(); } return hosts; } public void runBinarySinglePipeline() throws Exception { for (int i = 0; i < 10; i++) { DynoJedisPipeline pipeline = client.pipelined(); Map<byte[], byte[]> bar = new HashMap<byte[], byte[]>(); bar.put("key__1".getBytes(), "value__1".getBytes()); bar.put("key__2".getBytes(), "value__2".getBytes()); Response<String> hmsetResult = pipeline.hmset(("hash__" + i).getBytes(), bar); pipeline.sync(); System.out.println(hmsetResult.get()); } System.out.println("Reading all keys"); DynoJedisPipeline readPipeline = client.pipelined(); Response<Map<byte[], byte[]>> resp = readPipeline.hgetAll("hash__1".getBytes()); readPipeline.sync(); StringBuilder sb = new StringBuilder(); for (byte[] bytes : resp.get().keySet()) { if (sb.length() > 0) { sb.append(","); } sb.append(new String(bytes)); } System.out.println("Got hash :" + sb.toString()); } public void runCompressionInPipelineTest() throws Exception { final int maxNumKeys = 100; final int maxPipelineSize = 10; final int maxOperations = 500; final Random rand = new Random(); for (int operationIter = 0; operationIter < maxOperations; operationIter++) { DynoJedisPipeline pipeline = client.pipelined(); int pipelineSize = 1 + rand.nextInt(maxPipelineSize); // key to be used in pipeline String key = "hash__" + rand.nextInt(maxNumKeys); // Map of field -> value Map<String, String> map = new HashMap<>(); // List of fields to be later used in HMGet List<String> fields = new ArrayList<>(pipelineSize); // Create a map of field -> value, also accumulate all fields for (int pipelineIter = 0; pipelineIter < pipelineSize; pipelineIter++) { String field = "field_" + pipelineIter; fields.add(field); String prefixSuffix = key + "_" + field; String value = prefixSuffix + "_" + generateValue(pipelineIter) + "_" + prefixSuffix; map.put(field, value); } Response<String> HMSetResult = pipeline.hmset(key, map); Response<List<String>> HMGetResult = pipeline.hmget(key, fields.toArray(new String[fields.size()])); try { pipeline.sync(); } catch (Exception e) { pipeline.discardPipelineAndReleaseConnection(); System.out.println("Exception while writing key " + key + " fields: " + fields); throw e; } if (!HMSetResult.get().equals("OK")) { System.out.println("Result mismatch for HMSet key: '" + key + "' fields: '" + fields + "' result: '" + HMSetResult.get() + "'"); } if ((operationIter % 100) == 0) { System.out.println("\n>>>>>>>> " + operationIter + " operations performed...."); } List<String> HMGetResultStrings = HMGetResult.get(); for (int i = 0; i < HMGetResultStrings.size(); i++) { String prefixSuffix = key + "_" + fields.get(i); String value = HMGetResultStrings.get(i); if (value.startsWith(prefixSuffix) && value.endsWith(prefixSuffix)) { continue; } else { System.out.println("Result mismatch key: '" + key + "' field: '" + fields.get(i) + "' value: '" + HMGetResultStrings.get(i) + "'"); } } } System.out.println("Compression test Done: " + maxOperations + " pipeline operations performed."); } public void runSandboxTest() throws Exception { Set<String> keys = client.keys("zuulRules:*"); System.out.println("GOT KEYS"); System.out.println(keys.size()); } private static String generateValue(int kilobytes) { StringBuilder sb = new StringBuilder(kilobytes * 512); // estimating 2 // bytes per char for (int i = 0; i < kilobytes; i++) { for (int j = 0; j < 10; j++) { sb.append("abcdefghijklmnopqrstuvwxzy0123456789a1b2c3d4f5g6h7"); // 50 // characters // (~100 // bytes) sb.append(":"); sb.append("abcdefghijklmnopqrstuvwxzy0123456789a1b2c3d4f5g6h7"); sb.append(":"); } } return sb.toString(); } /** * This demo runs a pipeline across ten different keys. The pipeline leverages * the hash value {bar} to determine the node where to send the data. * * @throws Exception */ public void runPipelineWithHashtag() throws Exception { DynoJedisPipeline pipeline = client.pipelined(); try { pipeline.set("pipeline-hashtag1-{bar}", "value-1"); pipeline.set("pipeline-hashtag2-{bar}", "value-2"); pipeline.set("pipeline-hashtag3-{bar}", "value-3"); pipeline.set("pipeline-hashtag4-{bar}", "value-4"); pipeline.set("pipeline-hashtag5-{bar}", "value-5"); pipeline.set("pipeline-hashtag6-{bar}", "value-6"); pipeline.set("pipeline-hashtag7-{bar}", "value-7"); pipeline.set("pipeline-hashtag8-{bar}", "value-8"); pipeline.set("pipeline-hashtag9-{bar}", "value-9"); pipeline.set("pipeline-hashtag10-{bar}", "value-10"); Response<String> value1 = pipeline.get("pipeline-hashtag1-{bar}"); Response<String> value2 = pipeline.get("pipeline-hashtag2-{bar}"); Response<String> value3 = pipeline.get("pipeline-hashtag3-{bar}"); Response<String> value4 = pipeline.get("pipeline-hashtag4-{bar}"); Response<String> value5 = pipeline.get("pipeline-hashtag5-{bar}"); Response<String> value6 = pipeline.get("pipeline-hashtag6-{bar}"); pipeline.sync(); System.out.println(value1.get()); System.out.println(value2.get()); System.out.println(value3.get()); System.out.println(value4.get()); System.out.println(value5.get()); System.out.println(value6.get()); } catch (Exception e) { pipeline.discardPipelineAndReleaseConnection(); throw e; } } public void runPipeline() throws Exception { int numThreads = 5; final ExecutorService threadPool = Executors.newFixedThreadPool(numThreads); final AtomicBoolean stop = new AtomicBoolean(false); final CountDownLatch latch = new CountDownLatch(numThreads); for (int i = 0; i < numThreads; i++) { threadPool.submit(new Callable<Void>() { final Random rand = new Random(); @Override public Void call() throws Exception { final AtomicInteger iter = new AtomicInteger(0); while (!stop.get()) { int index = rand.nextInt(5); int i = iter.incrementAndGet(); DynoJedisPipeline pipeline = client.pipelined(); try { Response<Long> resultA1 = pipeline.hset("DynoJedisDemo_pipeline-" + index, "a1", constructRandomValue(index)); Response<Long> resultA2 = pipeline.hset("DynoJedisDemo_pipeline-" + index, "a2", "value-" + i); pipeline.sync(); System.out.println(resultA1.get() + " " + resultA2.get()); } catch (Exception e) { pipeline.discardPipelineAndReleaseConnection(); throw e; } } latch.countDown(); return null; } }); } Thread.sleep(5000); stop.set(true); latch.await(); threadPool.shutdownNow(); } private String constructRandomValue(int sizeInKB) { int requriredLength = sizeInKB * 1024; String s = randomValue; int sLength = s.length(); StringBuilder sb = new StringBuilder(); int lengthSoFar = 0; do { sb.append(s); lengthSoFar += sLength; } while (lengthSoFar < requriredLength); String ss = sb.toString(); if (ss.length() > requriredLength) { ss = sb.substring(0, requriredLength); } return ss; } private List<Host> getHostsFromDiscovery(final String clusterName) { String env = System.getProperty("netflix.environment", "test"); String discoveryKey = String.format("dyno.demo.discovery.%s", env); if (!System.getProperties().containsKey(discoveryKey)) { throw new IllegalArgumentException("Discovery URL not found"); } String localDatacenter = System.getProperty("LOCAL_DATACENTER"); final String discoveryUrl = String.format(System.getProperty(discoveryKey), localDatacenter); final String url = String.format("http://%s/%s", discoveryUrl, clusterName); HttpClient client = new DefaultHttpClient(); try { HttpResponse response = client.execute(new HttpGet(url)); InputStream in = response.getEntity().getContent(); SAXParserFactory parserFactor = SAXParserFactory.newInstance(); SAXParser parser = parserFactor.newSAXParser(); SAXHandler handler = new SAXHandler("instance", "public-hostname", "availability-zone", "status", "local-ipv4"); parser.parse(in, handler); List<Host> hosts = new ArrayList<Host>(); for (Map<String, String> map : handler.getList()) { String rack = map.get("availability-zone"); Status status = map.get("status").equalsIgnoreCase("UP") ? Status.Up : Status.Down; Host host = new HostBuilder().setHostname(map.get("public-hostname")).setIpAddress(map.get("local-ipv4")).setRack(rack).setStatus(status).createHost(); hosts.add(host); System.out.println("Host: " + host); } return hosts; } catch (Throwable e) { throw new RuntimeException(e); } } public void runLongTest() throws InterruptedException { final ExecutorService threadPool = Executors.newFixedThreadPool(2); final AtomicBoolean stop = new AtomicBoolean(false); final CountDownLatch latch = new CountDownLatch(2); final AtomicInteger success = new AtomicInteger(0); final AtomicInteger failure = new AtomicInteger(0); final AtomicInteger emptyReads = new AtomicInteger(0); threadPool.submit((Callable<Void>) () -> { while (!stop.get()) { System.out.println("Getting Value for key '0'"); String value = client.get("0"); System.out.println("Got Value for key '0' : " + value); Thread.sleep(5000); } latch.countDown(); return null; }); threadPool.submit((Callable<Void>) () -> { while (!stop.get()) { System.out.println("Success: " + success.get() + ", failure: " + failure.get() + ", emptyReads: " + emptyReads.get()); Thread.sleep(1000); } latch.countDown(); return null; }); Thread.sleep(60 * 1000); stop.set(true); latch.await(); threadPool.shutdownNow(); } private class SAXHandler extends DefaultHandler { private final List<Map<String, String>> list = new ArrayList<Map<String, String>>(); private final String rootElement; private final Set<String> interestElements = new HashSet<String>(); private Map<String, String> currentPayload = null; private String currentInterestElement = null; private SAXHandler(String root, String... interests) { rootElement = root; for (String s : interests) { interestElements.add(s); } } @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (qName.equalsIgnoreCase(rootElement)) { // prep for next instance currentPayload = new HashMap<String, String>(); return; } if (interestElements.contains(qName)) { // note the element to be parsed. this will be used in chars // callback currentInterestElement = qName; } } @Override public void endElement(String uri, String localName, String qName) throws SAXException { // add host to list if (qName.equalsIgnoreCase(rootElement)) { list.add(currentPayload); currentPayload = null; } } @Override public void characters(char[] ch, int start, int length) throws SAXException { String value = new String(ch, start, length); if (currentInterestElement != null && currentPayload != null) { currentPayload.put(currentInterestElement, value); currentInterestElement = null; } } public List<Map<String, String>> getList() { return list; } } public void runEvalTest() throws Exception { client.set("EvalTest", "true"); List<String> keys = Lists.newArrayList("EvalTest"); List<String> args = Lists.newArrayList("true"); Object obj = client.eval( "if redis.call('get', KEYS[1]) == ARGV[1] then return redis.call('del', KEYS[1]) else return 0 end", keys, args); if (obj.toString().equals("1")) System.out.println("EVAL Test Succeeded"); else System.out.println("EVAL Test Failed"); } private void runJsonTest() throws Exception { DynoJedisJsonClient jsonClient = new DynoJedisJsonClient(this.client); Gson gson = new Gson(); List<String> list = new ArrayList<>(); list.add("apple"); list.add("orange"); Map<String, List<String>> map = new HashMap<>(); map.put("fruits", list); final JsonPath jsonPath = new JsonPath().appendSubKey("fruits"); System.out.println("Get path: " + jsonPath.toString()); System.out.println("inserting json: " + list); OperationResult<String> set1Result = jsonClient.set("test1", map); OperationResult<String> set2Result = jsonClient.set("test2", map); OperationResult<Long> arrappendResult = jsonClient.arrappend("test1", new JsonPath().appendSubKey("fruits"), "mango"); OperationResult<Long> arrinsertResult = jsonClient.arrinsert("test1", new JsonPath().appendSubKey("fruits"), 0, "banana"); OperationResult<String> set3Result = jsonClient.set("test1", new JsonPath().appendSubKey("flowers"), Arrays.asList("rose", "lily")); OperationResult<Class<?>> typeResult = jsonClient.type("test1"); OperationResult<Object> get1Result = jsonClient.get("test1", jsonPath); OperationResult<Object> get2Result = jsonClient.get("test2", jsonPath); OperationResult<List<Object>> mgetResult = jsonClient.mget(Arrays.asList("test1", "test2"), jsonPath.atIndex(-1)); OperationResult<List<String>> objkeysResult = jsonClient.objkeys("test1"); OperationResult<Long> objlenResult = jsonClient.objlen("test1"); OperationResult<Long> del1Result = jsonClient.del("test1"); OperationResult<Long> del2Result = jsonClient.del("test2"); System.out.println("Json set1 result: " + set1Result.getResult()); System.out.println("Json set2 result: " + set2Result.getResult()); System.out.println("Json arrappend result: " + arrappendResult.getResult()); System.out.println("Json addinsert result: " + arrinsertResult.getResult()); System.out.println("Json set3 result: " + set3Result.getResult()); System.out.println("Json type result: " + typeResult.getResult().getTypeName()); System.out.println("Json get1 result: " + get1Result.getResult()); System.out.println("Json get2 result: " + get2Result.getResult()); System.out.println("Json mget result: " + mgetResult.getResult()); System.out.println("Json del1 result: " + del1Result.getResult()); System.out.println("Json del2 result: " + del2Result.getResult()); System.out.println("Json objkeys result: " + objkeysResult.getResult()); System.out.println("Json objlen result: " + objlenResult.getResult()); } public void runEvalShaTest() throws Exception { client.set("EvalShaTestKey", "EVALSHA_WORKS"); List<String> keys = Lists.newArrayList("EvalShaTestKey"); List<String> args = Lists.newArrayList(); String script_hash = client.scriptLoad("return redis.call('get', KEYS[1])"); // Make sure that the script is saved in Redis' script cache. if (client.scriptExists(script_hash) == Boolean.FALSE) { throw new Exception("Test failed. Script did not exist when it should have."); } Object obj = client.evalsha(script_hash, keys, args); if (obj.toString().equals("EVALSHA_WORKS")) System.out.println("EVALSHA Test Succeeded"); else throw new Exception("EVALSHA Test Failed. Expected: 'EVALSHA_WORKS'; Got: '" + obj.toString()); // Flush the script cache. client.scriptFlush(); // Make sure that the script is no longer in the cache. if (client.scriptExists(script_hash) == Boolean.TRUE) { throw new Exception("Test failed. Script existed when it shouldn't have."); } // Clean up the created key. client.del(keys.get(0)); System.out.println("SCRIPT EXISTS and SCRIPT FLUSH Test succeeded."); } private void runExpireHashTest() throws Exception { this.numKeys = 10; System.out.println("Expire hash test selected"); // write long ttl = 5; // seconds for (int i = 0; i < numKeys; i++) { System.out.println("Writing key/value => DynoClientTest-" + i + " / " + i); client.ehset("DynoClientTest", "DynoClientTest-" + i, "" + i, ttl); } // read System.out.println("Reading expire hash values (before ttl expiry)"); for (int i = 0; i < numKeys; i++) { String val = client.ehget("DynoClientTest", "DynoClientTest-" + i); System.out.println("Reading Key: " + i + ", Value: " + val); } // sleep for <ttl> seconds Thread.sleep(ttl * 1000); // read after expiry System.out.println("Reading expire hash values (after ttl expiry)"); for (int i = 0; i < numKeys; i++) { String val = client.ehget("DynoClientTest", "DynoClientTest-" + i); System.out.println("Reading Key: " + i + ", Value: " + val); } } /** * @param args <ol> * -l | -p <clusterName> [-s <clusterName>] -t <testNumber> * </ol> * <ol> * -l,--localhost localhost * -p,--primaryCluster <clusterName> Primary cluster * -s,--shadowCluster <clusterName> Shadow cluster * -t,--test <testNumber> Test to run * </ol> */ public static void main(String args[]) throws IOException { Option lock = new Option("k", "lock", false, "Dyno Lock"); lock.setArgName("lock"); Option primaryCluster = new Option("p", "primaryCluster", true, "Primary cluster"); primaryCluster.setArgName("clusterName"); Option secondaryCluster = new Option("s", "shadowCluster", true, "Shadow cluster"); secondaryCluster.setArgName("clusterName"); Option localhost = new Option("l", "localhost", false, "localhost"); Option test = new Option("t", "test", true, "Test to run"); test.setArgName("testNumber"); test.setRequired(true); OptionGroup cluster = new OptionGroup() .addOption(localhost) .addOption(primaryCluster); cluster.setRequired(true); Options options = new Options(); options.addOptionGroup(cluster) .addOption(secondaryCluster) .addOption(lock) .addOption(test); Properties props = new Properties(); props.load(DynoJedisDemo.class.getResourceAsStream("/demo.properties")); for (String name : props.stringPropertyNames()) { System.setProperty(name, props.getProperty(name)); } if (!props.containsKey("EC2_AVAILABILITY_ZONE") && !props.containsKey("dyno.demo.lbStrategy")) { throw new IllegalArgumentException( "MUST set local for load balancing OR set the load balancing strategy to round robin"); } String rack = props.getProperty("EC2_AVAILABILITY_ZONE", "us-east-1c"); String hostsFile = props.getProperty("dyno.demo.hostsFile"); String shadowHostsFile = props.getProperty("dyno.demo.shadowHostsFile"); int port = Integer.valueOf(props.getProperty("dyno.demo.port", "8102")); DynoJedisDemo demo = null; try { CommandLineParser parser = new DefaultParser(); CommandLine cli = parser.parse(options, args); int testNumber = Integer.parseInt(cli.getOptionValue("t")); boolean isLock = cli.hasOption("k"); if (cli.hasOption("l")) { demo = new DynoJedisDemo("dyno-localhost", rack); demo.initWithLocalHost(isLock); } else if (cli.hasOption("l")) { demo = new DynoJedisDemo("dyno-localhost", rack); demo.initWithLocalHost(false); } else { if (!cli.hasOption("s")) { demo = new DynoJedisDemo(cli.getOptionValue("p"), rack); if (hostsFile != null) { demo.initWithRemoteClusterFromFile(hostsFile, port, isLock); } else { demo.initWithRemoteClusterFromEurekaUrl(cli.getOptionValue("p"), port, isLock); } } else { demo = new DynoJedisDemo(cli.getOptionValue("p"), cli.getOptionValue("s"), rack); if (hostsFile != null) { demo.initDualClientWithRemoteClustersFromFile(hostsFile, shadowHostsFile, port); } else { demo.initDualClientWithRemoteClustersFromEurekaUrl(cli.getOptionValue("p"), cli.getOptionValue("s")); } } } System.out.println("Connected"); switch (testNumber) { case 1: { demo.runSimpleTest(); break; } case 2: { demo.runKeysTest(); break; } case 3: { demo.runSimpleTestWithHashtag(); break; } case 4: { demo.runMultiThreaded(); break; } case 5: { final boolean writeKeys = Boolean.valueOf(props.getProperty("dyno.demo.scan.populateKeys")); demo.runScanTest(writeKeys); break; } case 6: { demo.runPipeline(); break; } case 7: { demo.runPipelineWithHashtag(); break; } case 8: { demo.runSScanTest(true); break; } case 9: { demo.runCompressionInPipelineTest(); break; } case 10: { demo.runEvalTest(); demo.runEvalShaTest(); break; } case 11: { demo.runBinaryKeyTest(); break; } case 12: { demo.runExpireHashTest(); break; } case 13: { demo.runJsonTest(); break; } case 14: { demo.runLockTest(); break; } } // demo.runSinglePipeline(); // demo.runPipeline(); // demo.runBinarySinglePipeline(); // demo.runPipelineEmptyResult(); // demo.runSinglePipelineWithCompression(false); // demo.runLongTest(); // demo.runSandboxTest(); Thread.sleep(1000); // demo.cleanup(demo.numKeys); } catch (ParseException pe) { HelpFormatter helpFormatter = new HelpFormatter(); helpFormatter.printHelp(120, DynoJedisDemo.class.getSimpleName(), "", options, "", true); } catch (Throwable e) { e.printStackTrace(); } finally { if (demo != null) { demo.stop(); } System.out.println("Done"); System.out.flush(); System.err.flush(); System.exit(0); } } private void runLockTest() throws InterruptedException { String resourceName = "testResource"; long ttl = 5_000; boolean value = dynoLockClient.acquireLock(resourceName, ttl, (resource) -> logger.info("Extension failed")); if (value) { logger.info("Acquired lock on resource {} for {} ms ", resourceName, value); } dynoLockClient.logLocks(); Thread.sleep(100_000); dynoLockClient.releaseLock(resourceName); } }
5,966
0
Create_ds/dyno/dyno-demo/src/main/java/com/netflix/dyno/demo
Create_ds/dyno/dyno-demo/src/main/java/com/netflix/dyno/demo/redis/CustomTokenSupplierExample.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.demo.redis; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.HostBuilder; import com.netflix.dyno.connectionpool.HostSupplier; import com.netflix.dyno.connectionpool.OperationResult; import com.netflix.dyno.connectionpool.TokenMapSupplier; import com.netflix.dyno.connectionpool.impl.ConnectionPoolConfigurationImpl; import com.netflix.dyno.connectionpool.impl.lb.HostToken; import com.netflix.dyno.jedis.DynoJedisClient; import org.apache.log4j.BasicConfigurator; import java.util.Collections; import java.util.List; import java.util.Set; /** * Simple example that illustrates using a custom token map supplier. This example works with a local redis * installation on the default port. To setup and run: * <ol> * <li>brew install redis</li> * <li>redis-server /usr/local/etc/redis.conf</li> * <li>java -classpath &lt;...classpath...&gt; com.netflix.dyno.demo.redis.CustomTokenSupplierExample</li> * </ol> */ public class CustomTokenSupplierExample { private DynoJedisClient client; public CustomTokenSupplierExample() { } public void init() throws Exception { final int port = 6379; final Host localHost = new HostBuilder().setHostname("localhost").setPort(port).setRack("localrack").setStatus(Host.Status.Up).createHost(); final HostSupplier localHostSupplier = new HostSupplier() { @Override public List<Host> getHosts() { return Collections.singletonList(localHost); } }; final TokenMapSupplier supplier = new TokenMapSupplier() { @Override public List<HostToken> getTokens(Set<Host> activeHosts) { return Collections.singletonList(localHostToken); } @Override public HostToken getTokenForHost(Host host, Set<Host> activeHosts) { return localHostToken; } final HostToken localHostToken = new HostToken(100000L, localHost); }; client = new DynoJedisClient.Builder() .withApplicationName("tokenSupplierExample") .withDynomiteClusterName("tokenSupplierExample") .withHostSupplier(localHostSupplier) .withCPConfig(new ConnectionPoolConfigurationImpl("tokenSupplierExample") .withTokenSupplier(supplier)) .build(); } public void runSimpleTest() throws Exception { // write for (int i = 0; i < 10; i++) { client.set("" + i, "" + i); } // read for (int i = 0; i < 10; i++) { OperationResult<String> result = client.d_get("" + i); System.out.println("Key: " + i + ", Value: " + result.getResult() + " " + result.getNode()); } } public void stop() { if (client != null) { client.stopClient(); } } public static void main(String args[]) { BasicConfigurator.configure(); CustomTokenSupplierExample example = new CustomTokenSupplierExample(); try { example.init(); example.runSimpleTest(); Thread.sleep(1000); } catch (Exception e) { e.printStackTrace(); } finally { example.stop(); } } }
5,967
0
Create_ds/dyno/dyno-demo/src/main/java/com/netflix/dyno/demo
Create_ds/dyno/dyno-demo/src/main/java/com/netflix/dyno/demo/redis/DynoDistributedCounterDemo.java
/******************************************************************************* * Copyright 2011 Netflix * * Licensed 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/ package com.netflix.dyno.demo.redis; import com.netflix.dyno.recipes.counter.DynoCounter; import com.netflix.dyno.recipes.counter.DynoJedisBatchCounter; import com.netflix.dyno.recipes.counter.DynoJedisCounter; import com.netflix.dyno.recipes.counter.DynoJedisPipelineCounter; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.Random; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; /** * Demo of {@link DynoCounter} implementations. */ public class DynoDistributedCounterDemo extends DynoJedisDemo { private final List<DynoCounter> counters = new ArrayList<DynoCounter>(); public DynoDistributedCounterDemo(String clusterName, String localDC) { super(clusterName, localDC); } private void runMultiThreadedCounter(final int numCounters) throws Exception { for (int i = 0; i < numCounters; i++) { counters.add(new DynoJedisCounter(client.getConnPool().getName() + "-counter", client)); } this.runMultiThreaded(5000, false, 1, 2); } private void runMultiThreadedPipelineCounter(final int numCounters) throws Exception { for (int i = 0; i < numCounters; i++) { DynoJedisPipelineCounter counter = new DynoJedisPipelineCounter(client.getConnPool().getName() + "-async-counter-" + i, client); counter.initialize(); counters.add(counter); } this.runMultiThreaded(50000, false, 1, 2); } private void runSingleThreadedPipelineCounter() throws Exception { DynoJedisPipelineCounter counter = new DynoJedisPipelineCounter("demo-single-async", client); counter.initialize(); System.out.println("counter is currently set at " + counter.get()); for (int i = 0; i < 10000; i++) { counter.incr(); } counter.sync(); System.out.println("Total count => " + counter.get()); counter.close(); System.out.println("Cleaning up keys"); cleanup(counter); } private void runMultiThreadedBatchCounter(int numCounters) throws Exception { for (int i = 0; i < numCounters; i++) { DynoJedisBatchCounter counter = new DynoJedisBatchCounter( client.getConnPool().getName() + "-batch-counter", // key client, // client 500L // flush period ); counter.initialize(); counters.add(counter); } this.runMultiThreaded(-1, false, 1, 2); } @Override protected void startWrites(final int ops, final int numWriters, final ExecutorService threadPool, final AtomicBoolean stop, final CountDownLatch latch, final AtomicInteger success, final AtomicInteger failure) { final Random random = new Random(System.currentTimeMillis()); final int numCounters = counters.size() > 1 ? counters.size() - 1 : 1; for (int i = 0; i < numWriters; i++) { threadPool.submit(new Callable<Void>() { @Override public Void call() throws Exception { int localCount = 0; while (!stop.get() && (localCount < ops || ops == -1)) { try { int index = random.nextInt(numCounters); DynoCounter counter = counters.get(index); counter.incr(); success.incrementAndGet(); // If we are pipelining, sync every 10000 increments if (++localCount % 10000 == 0 && counter instanceof DynoJedisPipelineCounter) { System.out.println("WRITE - sync() " + Thread.currentThread().getName()); ((DynoJedisPipelineCounter) counter).sync(); } } catch (Exception e) { System.out.println("WRITE FAILURE: " + Thread.currentThread().getName() + ": " + e.getMessage()); e.printStackTrace(); failure.incrementAndGet(); } } for (DynoCounter counter : counters) { if (counter instanceof DynoJedisPipelineCounter) { System.out.println(Thread.currentThread().getName() + " => localCount = " + localCount); ((DynoJedisPipelineCounter) counter).sync(); } } latch.countDown(); System.out.println(Thread.currentThread().getName() + " => Done writes"); return null; } }); } } @Override protected void startReads(final int nKeys, final int numReaders, final ExecutorService threadPool, final AtomicBoolean stop, final CountDownLatch latch, final AtomicInteger success, final AtomicInteger failure, final AtomicInteger emptyReads) { threadPool.submit(new Callable<Void>() { @Override public Void call() throws Exception { if (counters != null && counters.get(0) instanceof DynoJedisPipelineCounter) { latch.countDown(); return null; } while (!stop.get()) { long result = 0L; for (DynoCounter counter : counters) { result += counter.get(); } System.out.println("counter value ==> " + result); Thread.sleep(1000); } latch.countDown(); return null; } }); } @Override protected void executePostRunActions() { long result = 0L; for (DynoCounter counter : counters) { if (counter instanceof DynoJedisPipelineCounter) { ((DynoJedisPipelineCounter) counter).sync(); } result += counter.get(); } System.out.println("COUNTER value ==> " + result); } @Override public void cleanup(int nKeys) { try { for (DynoCounter counter : counters) { cleanup(counter); } for (int i = 0; i < counters.size(); i++) { counters.remove(i); } } catch (Exception ex) { ex.printStackTrace(); } } public void cleanup(DynoCounter counter) throws Exception { for (String key : counter.getGeneratedKeys()) { System.out.println("deleting key: " + key); client.del(key); counter.close(); } } /** * Entry point to run {@link DynoCounter} demos * * @param args Should contain: * <ol>dynomite_cluster_name</ol> * <ol># of distributed counters (optional)</ol> */ public static void main(String[] args) throws IOException { final String clusterName = args[0]; final DynoDistributedCounterDemo demo = new DynoDistributedCounterDemo(clusterName, "us-east-1e"); int numCounters = (args.length == 2) ? Integer.valueOf(args[1]) : 1; Properties props = new Properties(); props.load(DynoDistributedCounterDemo.class.getResourceAsStream("/demo.properties")); for (String name : props.stringPropertyNames()) { System.setProperty(name, props.getProperty(name)); } try { demo.initWithRemoteClusterFromEurekaUrl(args[0], 8102, false); //demo.runMultiThreadedCounter(numCounters); //demo.runMultiThreadedPipelineCounter(numCounters); //demo.runSingleThreadedPipelineCounter(); demo.runMultiThreadedBatchCounter(numCounters); } catch (Exception ex) { ex.printStackTrace(); } finally { demo.stop(); System.out.println("Done"); } } }
5,968
0
Create_ds/dyno/dyno-demo/src/main/java/com/netflix/dyno/demo
Create_ds/dyno/dyno-demo/src/main/java/com/netflix/dyno/demo/memcached/DynoMCacheDriver.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.demo.memcached; //public class DynoMCacheDriver extends DynoDriver { // // private static final DynoDriver Instance = new DynoMCacheDriver(); // // private AtomicReference<DynoMCacheClient> client = new AtomicReference<DynoMCacheClient>(null); // // public static DynoDriver getInstance() { // return Instance; // } // // private DynoMCacheDriver() { // super(); // } // // public DynoClient dynoClientWrapper = new DynoClient () { // // @Override // public void init() { // client.set(DynoMCacheClient.Builder.withName("Demo") // .withDynomiteClusterName("dynomite_memcached_puneet") // .withConnectionPoolConfig(new ConnectionPoolConfigurationImpl("dynomite_memcached_puneet") // .setPort(8102)) // .build()); // } // // @Override // public String get(String key) throws Exception { // return client.get().<String>get(key).getResult(); // } // // @Override // public void set(String key, String value) { // client.get().<String>set(key, value); // } // }; // // public DynoClient getDynoClient() { // return dynoClientWrapper; // } //}
5,969
0
Create_ds/dyno/dyno-memcache/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-memcache/src/main/java/com/netflix/dyno/memcache/DynoMCacheClient.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.memcache; /** * Dyno client for Memcached that uses the {@link RollingMemcachedConnectionPoolImpl} for managing connections to {@link MemcachedClient}s * with local zone aware based RR load balancing and fallbacks to the remote zones * * @author poberai */ public class DynoMCacheClient { /**implements MemcachedClientIF { private final String cacheName; private final ConnectionPool<MemcachedClient> connPool; public DynoMCacheClient(String name, ConnectionPool<MemcachedClient> pool) { this.cacheName = name; this.connPool = pool; } private enum OpName { Add, Append, AsyncCas, AsyncDecr, AsyncGet, AsyncGetAndTouch, AsyncGets, AsyncIncr, Cas, Decr, Delete, Get, GetAndTouch, GetAsync, GetBulk, Gets, Incr, Prepend, Set, Touch } private abstract class BaseKeyOperation<T> implements Operation<MemcachedClient, T> { private final String key; private final OpName op; private BaseKeyOperation(final String k, final OpName o) { this.key = k; this.op = o; } @Override public String getName() { return op.name(); } @Override public String getKey() { return key; } } private abstract class BaseAsyncKeyOperation<T> implements AsyncOperation<MemcachedClient, T> { private final String key; private final OpName op; private BaseAsyncKeyOperation(final String k, final OpName o) { this.key = k; this.op = o; } @Override public String getName() { return op.name(); } @Override public String getKey() { return key; } } public String toString() { return this.cacheName; } public static class Builder { private String appName; private String clusterName; private ConnectionPoolConfigurationImpl cpConfig; public Builder(String name) { appName = name; } public Builder withDynomiteClusterName(String cluster) { clusterName = cluster; return this; } public Builder withConnectionPoolConfig(ConnectionPoolConfigurationImpl config) { cpConfig = config; return this; } public DynoMCacheClient build() { assert(appName != null); assert(clusterName != null); assert(cpConfig != null); // TODO: Add conn pool impl for MemcachedClient throw new RuntimeException("Dyno conn pool for Memcached Client NOT implemented. Coming soon."); } public static Builder withName(String name) { return new Builder(name); } } @Override public Collection<SocketAddress> getAvailableServers() { throw new RuntimeException("Not Implemented"); } @Override public Collection<SocketAddress> getUnavailableServers() { throw new RuntimeException("Not Implemented"); } @Override public Transcoder<Object> getTranscoder() { throw new RuntimeException("Not Implemented"); } @Override public NodeLocator getNodeLocator() { throw new RuntimeException("Not Implemented"); } @Override public Future<Boolean> append(final long cas, final String key, final Object val) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Append) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.append(cas, key, val)); } })); } @Override public Future<Boolean> append(final String key, final Object val) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Append) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.append(key, val)); } })); } @Override public <T> Future<Boolean> append(final long cas, final String key, final T val, final Transcoder<T> tc) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Append) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.append(cas, key, val)); } })); } @Override public <T> Future<Boolean> append(final String key, final T val, final Transcoder<T> tc) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Append) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.append(key, val)); } })); } @Override public Future<Boolean> prepend(final long cas, final String key, final Object val) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Prepend) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.prepend(cas, key, val)); } })); } @Override public Future<Boolean> prepend(final String key, final Object val) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Prepend) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.prepend(key, val)); } })); } @Override public <T> Future<Boolean> prepend(final long cas, final String key, final T val, final Transcoder<T> tc) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Prepend) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.prepend(cas, key, val)); } })); } @Override public <T> Future<Boolean> prepend(final String key, final T val, final Transcoder<T> tc) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Prepend) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.prepend(key, val, tc)); } })); } @Override public <T> Future<CASResponse> asyncCAS(final String key, final long casId, final T value, final Transcoder<T> tc) { return new DecoratingFuture<CASResponse>(connPool.executeAsync(new BaseAsyncKeyOperation<CASResponse>(key, OpName.AsyncCas) { @Override public ListenableFuture<CASResponse> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<CASResponse>(client.asyncCAS(key, casId, value, tc)); } })); } @Override public Future<CASResponse> asyncCAS(final String key, final long casId, final Object value) { return new DecoratingFuture<CASResponse>(connPool.executeAsync(new BaseAsyncKeyOperation<CASResponse>(key, OpName.AsyncCas) { @Override public ListenableFuture<CASResponse> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<CASResponse>(client.asyncCAS(key, casId, value)); } })); } @Override public Future<CASResponse> asyncCAS(final String key, final long casId, final int exp, final Object value) { return new DecoratingFuture<CASResponse>(connPool.executeAsync(new BaseAsyncKeyOperation<CASResponse>(key, OpName.Cas) { @Override public ListenableFuture<CASResponse> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<CASResponse>(client.asyncCAS(key, casId, exp, value)); } })); } @Override public <T> CASResponse cas(final String key, final long casId, final int exp, final T value, final Transcoder<T> tc) { return connPool.executeWithFailover(new BaseKeyOperation<CASResponse>(key, OpName.Cas) { @Override public CASResponse execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.cas(key, casId, exp, value, tc); } }).getResult(); } @Override public CASResponse cas(final String key, final long casId, final Object value) { return connPool.executeWithFailover(new BaseKeyOperation<CASResponse>(key, OpName.Cas) { @Override public CASResponse execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.cas(key, casId, value); } }).getResult(); } @Override public CASResponse cas(final String key, final long casId, final int exp, final Object value) { return connPool.executeWithFailover(new BaseKeyOperation<CASResponse>(key, OpName.Cas) { @Override public CASResponse execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.cas(key, casId, exp, value); } }).getResult(); } @Override public <T> Future<Boolean> add(final String key, final int exp, final T o, final Transcoder<T> tc) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Add) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.add(key, exp, o)); } })); } @Override public Future<Boolean> add(final String key, final int exp, final Object o) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Add) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.add(key, exp, o)); } })); } @Override public <T> Future<Boolean> set(final String key, final int exp, final T o, final Transcoder<T> tc) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Set) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.set(key, exp, o, tc)); } })); } @Override public Future<Boolean> set(final String key, final int exp, final Object o) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Set) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.set(key, exp, o)); } })); } @Override public <T> Future<Boolean> replace(final String key, final int exp, final T o, final Transcoder<T> tc) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Append) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.replace(key, exp, o, tc)); } })); } @Override public Future<Boolean> replace(final String key, final int exp, final Object o) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Append) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.replace(key, exp, o)); } })); } @Override public <T> Future<T> asyncGet(final String key, final Transcoder<T> tc) { return new DecoratingFuture<T>(connPool.executeAsync(new BaseAsyncKeyOperation<T>(key, OpName.AsyncGet) { @Override public ListenableFuture<T> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<T>(client.asyncGet(key, tc)); } })); } @Override public Future<Object> asyncGet(final String key) { return new DecoratingFuture<Object>(connPool.executeAsync(new BaseAsyncKeyOperation<Object>(key, OpName.AsyncGet) { @Override public ListenableFuture<Object> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Object>(client.asyncGet(key)); } })); } @Override public Future<CASValue<Object>> asyncGetAndTouch(final String key, final int exp) { return new DecoratingFuture<CASValue<Object>>(connPool.executeAsync(new BaseAsyncKeyOperation<CASValue<Object>>(key, OpName.AsyncGetAndTouch) { @Override public ListenableFuture<CASValue<Object>> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<CASValue<Object>>(client.asyncGets(key)); } })); } @Override public <T> Future<CASValue<T>> asyncGetAndTouch(final String key, final int exp, final Transcoder<T> tc) { return new DecoratingFuture<CASValue<T>>(connPool.executeAsync(new BaseAsyncKeyOperation<CASValue<T>>(key, OpName.AsyncGetAndTouch) { @Override public ListenableFuture<CASValue<T>> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<CASValue<T>>(client.asyncGetAndTouch(key, exp, tc)); } })); } @Override public <T> Future<CASValue<T>> asyncGets(final String key, final Transcoder<T> tc) { return new DecoratingFuture<CASValue<T>>(connPool.executeAsync(new BaseAsyncKeyOperation<CASValue<T>>(key, OpName.AsyncGets) { @Override public ListenableFuture<CASValue<T>> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<CASValue<T>>(client.asyncGets(key, tc)); } })); } @Override public Future<CASValue<Object>> asyncGets(final String key) { return new DecoratingFuture<CASValue<Object>>(connPool.executeAsync(new BaseAsyncKeyOperation<CASValue<Object>>(key, OpName.AsyncGets) { @Override public ListenableFuture<CASValue<Object>> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<CASValue<Object>>(client.asyncGets(key)); } })); } @Override public <T> CASValue<T> gets(final String key, final Transcoder<T> tc) { return connPool.executeWithFailover(new BaseKeyOperation<CASValue<T>>(key, OpName.Gets) { @Override public CASValue<T> execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.gets(key, tc); } }).getResult(); } @Override public CASValue<Object> gets(final String key) { return connPool.executeWithFailover(new BaseKeyOperation<CASValue<Object>>(key, OpName.Gets) { @Override public CASValue<Object> execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.gets(key); } }).getResult(); } @Override public <T> T get(final String key, final Transcoder<T> tc) { return connPool.executeWithFailover(new BaseKeyOperation<T>(key, OpName.Get) { @Override public T execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.get(key, tc); } }).getResult(); } @Override public <T> BulkFuture<Map<String, T>> asyncGetBulk(Iterator<String> keys, Iterator<Transcoder<T>> tcs) { throw new RuntimeException("Not Implemented"); } @Override public <T> BulkFuture<Map<String, T>> asyncGetBulk(Collection<String> keys, Iterator<Transcoder<T>> tcs) { throw new RuntimeException("Not Implemented"); } @Override public <T> BulkFuture<Map<String, T>> asyncGetBulk(Iterator<String> keys, Transcoder<T> tc) { throw new RuntimeException("Not Implemented"); } @Override public <T> BulkFuture<Map<String, T>> asyncGetBulk(Collection<String> keys, Transcoder<T> tc) { throw new RuntimeException("Not Implemented"); } @Override public BulkFuture<Map<String, Object>> asyncGetBulk(Iterator<String> keys) { throw new RuntimeException("Not Implemented"); } @Override public BulkFuture<Map<String, Object>> asyncGetBulk(Collection<String> keys) { throw new RuntimeException("Not Implemented"); } @Override public <T> BulkFuture<Map<String, T>> asyncGetBulk(Transcoder<T> tc, String... keys) { throw new RuntimeException("Not Implemented"); } @Override public BulkFuture<Map<String, Object>> asyncGetBulk(String... keys) { throw new RuntimeException("Not Implemented"); } @Override public <T> Map<String, T> getBulk(Iterator<String> keys, Transcoder<T> tc) { throw new RuntimeException("Not Implemented"); } @Override public Map<String, Object> getBulk(Iterator<String> keys) { throw new RuntimeException("Not Implemented"); } @Override public <T> Future<Boolean> touch(final String key, final int exp, final Transcoder<T> tc) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Touch) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.touch(key, exp, tc)); } })); } @Override public <T> Future<Boolean> touch(final String key, final int exp) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Append) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.touch(key, exp)); } })); } @Override public Map<SocketAddress, String> getVersions() { throw new RuntimeException("Not Implemented"); } @Override public Map<SocketAddress, Map<String, String>> getStats() { throw new RuntimeException("Not Implemented"); } @Override public Map<SocketAddress, Map<String, String>> getStats(String prefix) { throw new RuntimeException("Not Implemented"); } @Override public long incr(final String key, final long by) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Incr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.incr(key, by); } }).getResult(); } @Override public long incr(final String key, final int by) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Incr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.incr(key, by); } }).getResult(); } @Override public long decr(final String key, final long by) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Decr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.decr(key, by); } }).getResult(); } @Override public long decr(final String key, final int by) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Decr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.decr(key, by); } }).getResult(); } @Override public long incr(final String key, final long by, final long def, final int exp) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Incr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.incr(key, by, def, exp); } }).getResult(); } @Override public long incr(final String key, final int by, final long def, final int exp) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Incr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.incr(key, by, def, exp); } }).getResult(); } @Override public long decr(final String key, final long by, final long def, final int exp) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Decr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.incr(key, by, def, exp); } }).getResult(); } @Override public long decr(final String key, final int by, final long def, final int exp) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Decr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.incr(key, by, def, exp); } }).getResult(); } @Override public Future<Long> asyncIncr(final String key, final long by) { return new DecoratingFuture<Long>(connPool.executeAsync(new BaseAsyncKeyOperation<Long>(key, OpName.AsyncIncr) { @Override public ListenableFuture<Long> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Long>(client.asyncIncr(key, by)); } })); } @Override public Future<Long> asyncIncr(final String key, final int by) { return new DecoratingFuture<Long>(connPool.executeAsync(new BaseAsyncKeyOperation<Long>(key, OpName.AsyncIncr) { @Override public ListenableFuture<Long> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Long>(client.asyncIncr(key, by)); } })); } @Override public Future<Long> asyncDecr(final String key, final long by) { return new DecoratingFuture<Long>(connPool.executeAsync(new BaseAsyncKeyOperation<Long>(key, OpName.AsyncDecr) { @Override public ListenableFuture<Long> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Long>(client.asyncDecr(key, by)); } })); } @Override public Future<Long> asyncDecr(final String key, final int by) { return new DecoratingFuture<Long>(connPool.executeAsync(new BaseAsyncKeyOperation<Long>(key, OpName.AsyncDecr) { @Override public ListenableFuture<Long> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Long>(client.asyncDecr(key, by)); } })); } @Override public long incr(final String key, final long by, final long def) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Incr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.incr(key, by, def); } }).getResult(); } @Override public long incr(final String key, final int by, final long def) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Incr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.incr(key, by, def); } }).getResult(); } @Override public long decr(final String key, final long by, final long def) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Decr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.decr(key, by, def); } }).getResult(); } @Override public long decr(final String key, final int by, final long def) { return connPool.executeWithFailover(new BaseKeyOperation<Long>(key, OpName.Decr) { @Override public Long execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.decr(key, by, def); } }).getResult(); } @Override public Future<Boolean> delete(final String key, final long cas) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Delete) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.delete(key, cas)); } })); } @Override public Future<Boolean> flush(int delay) { throw new RuntimeException("Not Implemented"); } @Override public Future<Boolean> flush() { throw new RuntimeException("Not Implemented"); } @Override public void shutdown() { throw new RuntimeException("Not Implemented"); } @Override public boolean shutdown(long timeout, TimeUnit unit) { throw new RuntimeException("Not Implemented"); } @Override public boolean waitForQueues(long timeout, TimeUnit unit) { throw new RuntimeException("Not Implemented"); } @Override public boolean addObserver(ConnectionObserver obs) { throw new RuntimeException("Not Implemented"); } @Override public boolean removeObserver(ConnectionObserver obs) { throw new RuntimeException("Not Implemented"); } @Override public Set<String> listSaslMechanisms() { throw new RuntimeException("Not Implemented"); } @Override public CASValue<Object> getAndTouch(final String key, final int exp) { return connPool.executeWithFailover(new BaseKeyOperation<CASValue<Object>>(key, OpName.GetAndTouch) { @Override public CASValue<Object> execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.getAndTouch(key, exp); } }).getResult(); } @Override public <T> CASValue<T> getAndTouch(final String key, final int exp, final Transcoder<T> tc) { return connPool.executeWithFailover(new BaseKeyOperation<CASValue<T>>(key, OpName.GetAndTouch) { @Override public CASValue<T> execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.getAndTouch(key, exp ,tc); } }).getResult(); } @Override public Object get(final String key) { return connPool.executeWithFailover(new BaseKeyOperation<Object>(key, OpName.Get) { @Override public Object execute(final MemcachedClient client, ConnectionContext state) throws DynoException { return client.get(key); } }).getResult(); } @Override public <T> Map<String, T> getBulk(Collection<String> keys, Transcoder<T> tc) { throw new RuntimeException("Not Implemented"); } @Override public Map<String, Object> getBulk(Collection<String> keys) { throw new RuntimeException("Not Implemented"); } @Override public <T> Map<String, T> getBulk(Transcoder<T> tc, String... keys) { throw new RuntimeException("Not Implemented"); } @Override public Map<String, Object> getBulk(String... keys) { throw new RuntimeException("Not Implemented"); } @Override public Future<Boolean> delete(final String key) { return new DecoratingFuture<Boolean>(connPool.executeAsync(new BaseAsyncKeyOperation<Boolean>(key, OpName.Delete) { @Override public ListenableFuture<Boolean> executeAsync(MemcachedClient client) throws DynoException { return new DecoratingListenableFuture<Boolean>(client.delete(key)); } })); } */ }
5,970
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/FutureOperationalResultImplTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.FutureTask; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.OperationResult; public class FutureOperationalResultImplTest { @Test public void testFutureResult() throws Exception { final FutureTask<Integer> futureTask = new FutureTask<Integer>(new Callable<Integer>() { @Override public Integer call() throws Exception { return 11; } }); LastOperationMonitor opMonitor = new LastOperationMonitor(); FutureOperationalResultImpl<Integer> futureResult = new FutureOperationalResultImpl<Integer>("test", futureTask, System.currentTimeMillis(), opMonitor); ExecutorService threadPool = Executors.newSingleThreadExecutor(); threadPool.submit(new Callable<Void>() { @Override public Void call() throws Exception { Thread.sleep(400); futureTask.run(); return null; } }); OperationResult<Integer> opResult = futureResult.get(); int integerResult = opResult.getResult(); long latency = opResult.getLatency(); Assert.assertEquals(11, integerResult); Assert.assertTrue(latency >= 400); threadPool.shutdownNow(); } }
5,971
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/CountingConnectionPoolMonitorTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl; import com.netflix.dyno.connectionpool.HostBuilder; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.exception.NoAvailableHostsException; import com.netflix.dyno.connectionpool.exception.PoolExhaustedException; import com.netflix.dyno.connectionpool.exception.PoolTimeoutException; public class CountingConnectionPoolMonitorTest { @Test public void testProcess() throws Exception { CountingConnectionPoolMonitor counter = new CountingConnectionPoolMonitor(); Host host1 = new HostBuilder().setHostname("host1").setIpAddress("address1").setPort(1111).setRack("rack1").createHost(); Host host2 = new HostBuilder().setHostname("host2").setIpAddress("address2").setPort(2222).setRack("rack1").createHost(); // Host 1 counter.incConnectionCreated(host1); counter.incConnectionClosed(host1, null); counter.incConnectionCreateFailed(host1, null); counter.incConnectionBorrowed(host1, 0); counter.incConnectionReturned(host1); counter.incOperationSuccess(host1, 0); counter.incOperationFailure(host1, null); // Host 2 counter.incConnectionBorrowed(host2, 0); counter.incConnectionReturned(host2); counter.incOperationSuccess(host2, 0); counter.incOperationFailure(host2, null); counter.incOperationFailure(host2, new PoolTimeoutException("")); counter.incOperationFailure(host2, new PoolExhaustedException(null, "")); counter.incOperationFailure(host2, new NoAvailableHostsException("")); // VERIFY COUNTS Assert.assertEquals(1, counter.getConnectionCreatedCount()); Assert.assertEquals(1, counter.getConnectionClosedCount()); Assert.assertEquals(1, counter.getConnectionCreateFailedCount()); Assert.assertEquals(2, counter.getConnectionBorrowedCount()); Assert.assertEquals(2, counter.getConnectionReturnedCount()); Assert.assertEquals(2, counter.getOperationSuccessCount()); Assert.assertEquals(5, counter.getOperationFailureCount()); Assert.assertEquals(1, counter.getHostStats().get(host1).getConnectionsBorrowed()); Assert.assertEquals(1, counter.getHostStats().get(host1).getConnectionsReturned()); Assert.assertEquals(1, counter.getHostStats().get(host1).getConnectionsCreated()); Assert.assertEquals(1, counter.getHostStats().get(host1).getConnectionsCreateFailed()); Assert.assertEquals(1, counter.getHostStats().get(host1).getOperationSuccessCount()); Assert.assertEquals(1, counter.getHostStats().get(host1).getOperationErrorCount()); Assert.assertEquals(1, counter.getHostStats().get(host2).getConnectionsBorrowed()); Assert.assertEquals(1, counter.getHostStats().get(host2).getConnectionsReturned()); Assert.assertEquals(0, counter.getHostStats().get(host2).getConnectionsCreated()); Assert.assertEquals(0, counter.getHostStats().get(host2).getConnectionsCreateFailed()); Assert.assertEquals(1, counter.getHostStats().get(host2).getOperationSuccessCount()); Assert.assertEquals(4, counter.getHostStats().get(host2).getOperationErrorCount()); } }
5,972
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/RetryNTimesTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl; import org.junit.Assert; import org.junit.Test; public class RetryNTimesTest { @Test public void testNRetries() throws Exception { RetryNTimes retry = new RetryNTimes(3, true); RuntimeException e = new RuntimeException("failure"); retry.begin(); Assert.assertTrue(retry.allowRetry()); retry.failure(e); Assert.assertTrue(retry.allowRetry()); retry.failure(e); Assert.assertTrue(retry.allowRetry()); retry.failure(e); Assert.assertTrue(retry.allowRetry()); retry.failure(e); Assert.assertFalse(retry.allowRetry()); Assert.assertEquals(4, retry.getAttemptCount()); } }
5,973
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/RunOnceTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl; import org.junit.Assert; import org.junit.Test; public class RunOnceTest { @Test public void testRetry() throws Exception { RunOnce retry = new RunOnce(); RuntimeException e = new RuntimeException("failure"); retry.begin(); Assert.assertTrue(retry.allowRetry()); retry.failure(e); Assert.assertFalse(retry.allowRetry()); retry.failure(e); Assert.assertFalse(retry.allowRetry()); Assert.assertEquals(1, retry.getAttemptCount()); } }
5,974
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/SimpleAsyncConnectionPoolImplTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl; import com.netflix.dyno.connectionpool.Connection; import com.netflix.dyno.connectionpool.ConnectionFactory; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.HostBuilder; import com.netflix.dyno.connectionpool.HostConnectionPool; import com.netflix.dyno.connectionpool.exception.DynoConnectException; import com.netflix.dyno.connectionpool.exception.FatalConnectionException; import com.netflix.dyno.connectionpool.exception.ThrottledException; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import static org.mockito.Mockito.mock; public class SimpleAsyncConnectionPoolImplTest { // TEST UTILS SETUP private static final Host TestHost = new HostBuilder().setHostname("TestHost").setIpAddress("TestIp").setPort(1234).setRack("TestRack").createHost(); private class TestClient { } private static SimpleAsyncConnectionPoolImpl<TestClient> pool; private static ExecutorService threadPool; private static ConnectionFactory<TestClient> connFactory = new ConnectionFactory<TestClient>() { @SuppressWarnings("unchecked") @Override public Connection<TestClient> createConnection(HostConnectionPool<TestClient> pool) throws DynoConnectException, ThrottledException { return mock(Connection.class); } @Override public Connection<TestClient> createConnectionWithDataStore(HostConnectionPool<TestClient> pool) throws DynoConnectException { return null; } @Override public Connection<TestClient> createConnectionWithConsistencyLevel(HostConnectionPool<TestClient> pool, String consistency) throws DynoConnectException { return null; } }; private static ConnectionPoolConfigurationImpl config = new ConnectionPoolConfigurationImpl("TestClient"); private static CountingConnectionPoolMonitor cpMonitor = new CountingConnectionPoolMonitor(); @BeforeClass public static void beforeClass() { threadPool = Executors.newFixedThreadPool(10); } @Before public void beforeTest() { cpMonitor = new CountingConnectionPoolMonitor(); // reset all monitor stats } @After public void afterTest() { if (pool != null) { pool.shutdown(); } } @AfterClass public static void afterClass() { threadPool.shutdownNow(); } @Test public void testRegularProcess() throws Exception { pool = new SimpleAsyncConnectionPoolImpl<TestClient>(TestHost, connFactory, config, cpMonitor); pool.primeConnections(); int nThreads = 3; final TestControl control = new TestControl(3); final BasicResult total = new BasicResult(); for (int i = 0; i < nThreads; i++) { threadPool.submit(new BasicWorker(total, control)); } Thread.sleep(300); control.stop(); control.waitOnFinish(); Assert.assertEquals("Total: " + total, total.opCount.get(), total.successCount.get()); Assert.assertEquals("Total: " + total, 0, total.failureCount.get()); Assert.assertTrue("Total: " + total, total.lastSuccess.get()); pool.shutdown(); Assert.assertEquals("Conns borrowed: " + cpMonitor.getConnectionBorrowedCount(), total.successCount.get(), cpMonitor.getConnectionBorrowedCount()); Assert.assertEquals("Conns returned: " + cpMonitor.getConnectionReturnedCount(), cpMonitor.getConnectionBorrowedCount(), cpMonitor.getConnectionReturnedCount()); Assert.assertEquals("Conns created: " + cpMonitor.getConnectionCreatedCount(), config.getMaxConnsPerHost(), cpMonitor.getConnectionCreatedCount()); Assert.assertEquals("Conns closed: " + cpMonitor.getConnectionClosedCount(), cpMonitor.getConnectionCreatedCount(), cpMonitor.getConnectionClosedCount()); Assert.assertEquals("Conns create failed: " + cpMonitor.getConnectionCreateFailedCount(), 0, cpMonitor.getConnectionCreateFailedCount()); } @Test public void testMarkHostAsDown() throws Exception { pool = new SimpleAsyncConnectionPoolImpl<TestClient>(TestHost, connFactory, config, cpMonitor); pool.primeConnections(); int nThreads = 3; final TestControl control = new TestControl(3); final BasicResult total = new BasicResult(); for (int i = 0; i < nThreads; i++) { threadPool.submit(new BasicWorker(total, control)); } Thread.sleep(500); pool.markAsDown(new FatalConnectionException("mark pool as down")); Thread.sleep(200); control.stop(); control.waitOnFinish(); Assert.assertTrue("Total: " + total, total.failureCount.get() > 0); Assert.assertFalse("Total: " + total, total.lastSuccess.get()); Assert.assertEquals("Total: " + total, total.opCount.get(), (total.successCount.get() + total.failureCount.get())); pool.shutdown(); Assert.assertEquals("Conns borrowed: " + cpMonitor.getConnectionBorrowedCount(), total.successCount.get(), cpMonitor.getConnectionBorrowedCount()); Assert.assertEquals("Conns returned: " + cpMonitor.getConnectionReturnedCount(), cpMonitor.getConnectionBorrowedCount(), cpMonitor.getConnectionReturnedCount()); Assert.assertEquals("Conns created: " + cpMonitor.getConnectionCreatedCount(), config.getMaxConnsPerHost(), cpMonitor.getConnectionCreatedCount()); Assert.assertEquals("Conns closed: " + cpMonitor.getConnectionClosedCount(), cpMonitor.getConnectionCreatedCount(), cpMonitor.getConnectionClosedCount()); Assert.assertEquals("Conns create failed: " + cpMonitor.getConnectionCreateFailedCount(), 0, cpMonitor.getConnectionCreateFailedCount()); } @Test public void testReconnect() throws Exception { pool = new SimpleAsyncConnectionPoolImpl<TestClient>(TestHost, connFactory, config, cpMonitor); pool.primeConnections(); int nThreads = 3; TestControl control = new TestControl(3); BasicResult total = new BasicResult(); for (int i = 0; i < nThreads; i++) { threadPool.submit(new BasicWorker(total, control)); } Thread.sleep(500); Assert.assertFalse("Total: " + total, total.failureCount.get() > 0); Assert.assertTrue("Total: " + total, total.lastSuccess.get()); pool.markAsDown(new FatalConnectionException("mark pool as down")); Thread.sleep(200); control.stop(); control.waitOnFinish(); Assert.assertTrue("Total: " + total, total.failureCount.get() > 0); Assert.assertFalse("Total: " + total, total.lastSuccess.get()); Assert.assertEquals("Total: " + total, total.opCount.get(), (total.successCount.get() + total.failureCount.get())); pool.reconnect(); Thread.sleep(100); control = new TestControl(3); total = new BasicResult(); for (int i = 0; i < nThreads; i++) { threadPool.submit(new BasicWorker(total, control)); } Thread.sleep(500); control.stop(); control.waitOnFinish(); Assert.assertEquals("Total: " + total, total.opCount.get(), total.successCount.get()); Assert.assertEquals("Total: " + total, 0, total.failureCount.get()); Assert.assertTrue("Total: " + total, total.lastSuccess.get()); pool.shutdown(); Assert.assertEquals("Conns returned: " + cpMonitor.getConnectionReturnedCount(), cpMonitor.getConnectionBorrowedCount(), cpMonitor.getConnectionReturnedCount()); Assert.assertEquals("Conns created: " + cpMonitor.getConnectionCreatedCount(), 2 * config.getMaxConnsPerHost(), cpMonitor.getConnectionCreatedCount()); Assert.assertEquals("Conns closed: " + cpMonitor.getConnectionClosedCount(), cpMonitor.getConnectionCreatedCount(), cpMonitor.getConnectionClosedCount()); Assert.assertEquals("Conns create failed: " + cpMonitor.getConnectionCreateFailedCount(), 0, cpMonitor.getConnectionCreateFailedCount()); } private class BasicWorker implements Callable<Void> { private final BasicResult result; private final TestControl control; private int sleepMs = -1; private BasicWorker(BasicResult result, TestControl testControl) { this.result = result; this.control = testControl; } private BasicWorker(BasicResult result, TestControl testControl, int sleep) { this.result = result; this.control = testControl; this.sleepMs = sleep; } @Override public Void call() throws Exception { while (!control.isStopped() && !Thread.currentThread().isInterrupted()) { Connection<TestClient> connection = null; try { connection = pool.borrowConnection(20, TimeUnit.MILLISECONDS); if (sleepMs > 0) { Thread.sleep(sleepMs); } pool.returnConnection(connection); result.successCount.incrementAndGet(); result.lastSuccess.set(true); } catch (InterruptedException e) { } catch (DynoConnectException e) { result.failureCount.incrementAndGet(); result.lastSuccess.set(false); } finally { result.opCount.incrementAndGet(); } } control.reportFinish(); return null; } } private class TestControl { private final AtomicBoolean stop = new AtomicBoolean(false); private final CountDownLatch latch; private TestControl(int n) { latch = new CountDownLatch(n); } private void reportFinish() { latch.countDown(); } private void waitOnFinish() throws InterruptedException { latch.await(); } private boolean isStopped() { return stop.get(); } private void stop() { stop.set(true); } } private class BasicResult { private final AtomicInteger opCount = new AtomicInteger(0); private final AtomicInteger successCount = new AtomicInteger(0); private final AtomicInteger failureCount = new AtomicInteger(0); private AtomicBoolean lastSuccess = new AtomicBoolean(false); private BasicResult() { } @Override public String toString() { return "BasicResult [opCount=" + opCount + ", successCount=" + successCount + ", failureCount=" + failureCount + ", lastSuccess=" + lastSuccess.get() + "]"; } } }
5,975
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/OperationResultImplTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl; import java.util.concurrent.TimeUnit; import com.netflix.dyno.connectionpool.HostBuilder; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.OperationMonitor; public class OperationResultImplTest { @Test public void testProcess() throws Exception { OperationMonitor monitor = new LastOperationMonitor(); OperationResultImpl<Integer> opResult = new OperationResultImpl<Integer>("test", 11, monitor); Host host = new HostBuilder().setHostname("testHost").setIpAddress("rand_ip").setPort(1234).setRack("rand_rack").createHost(); opResult.attempts(2) .addMetadata("foo", "f1").addMetadata("bar", "b1") .setLatency(10, TimeUnit.MILLISECONDS) .setNode(host); Assert.assertEquals(2, opResult.getAttemptsCount()); Assert.assertEquals(10, opResult.getLatency()); Assert.assertEquals(10, opResult.getLatency(TimeUnit.MILLISECONDS)); Assert.assertEquals(host, opResult.getNode()); Assert.assertEquals("f1", opResult.getMetadata().get("foo")); Assert.assertEquals("b1", opResult.getMetadata().get("bar")); } }
5,976
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/ConnectionContextImplTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl; import org.junit.Assert; import org.junit.Test; public class ConnectionContextImplTest { @Test public void testMetadata() throws Exception { ConnectionContextImpl context = new ConnectionContextImpl(); Assert.assertFalse(context.hasMetadata("m1")); context.setMetadata("m1", "foobar"); Assert.assertTrue(context.hasMetadata("m1")); Assert.assertEquals("foobar", context.getMetadata("m1")); context.reset(); Assert.assertFalse(context.hasMetadata("m1")); } }
5,977
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/HostStatusTrackerTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl; import java.util.Collection; import java.util.HashSet; import java.util.Set; import com.netflix.dyno.connectionpool.HostBuilder; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.impl.utils.CollectionUtils; import com.netflix.dyno.connectionpool.impl.utils.CollectionUtils.Transform; public class HostStatusTrackerTest { @Test public void testMutuallyExclusive() throws Exception { Set<Host> up = getHostSet("A", "B", "D", "E"); Set<Host> down = getHostSet("C", "F", "H"); new HostStatusTracker(up, down); up = getHostSet(); down = getHostSet("C", "F", "H"); new HostStatusTracker(up, down); up = getHostSet("A", "C", "D"); down = getHostSet(); new HostStatusTracker(up, down); } @Test(expected = RuntimeException.class) public void testNotMutuallyExclusive() throws Exception { Set<Host> up = getHostSet("A", "B", "D", "E"); Set<Host> down = getHostSet("C", "F", "H", "E"); new HostStatusTracker(up, down); } @Test public void testEurekaUpdates() throws Exception { Set<Host> up = getHostSet("A", "B", "D", "E"); Set<Host> down = getHostSet("C", "F", "H"); // First time update HostStatusTracker tracker = new HostStatusTracker(up, down); verifySet(tracker.getActiveHosts(), "A", "E", "D", "B"); verifySet(tracker.getInactiveHosts(), "C", "H", "F"); // Round 2. New server 'J' shows up tracker = tracker.computeNewHostStatus(getHostSet("A", "B", "E", "D", "J"), getHostSet("C", "H", "F")); verifySet(tracker.getActiveHosts(), "A", "E", "D", "J", "B"); verifySet(tracker.getInactiveHosts(), "C", "H", "F"); // Round 3. server 'A' goes from active to inactive tracker = tracker.computeNewHostStatus(getHostSet("B", "E", "D", "J"), getHostSet("A", "C", "H", "F")); verifySet(tracker.getActiveHosts(), "E", "D", "J", "B"); verifySet(tracker.getInactiveHosts(), "C", "A", "H", "F"); // Round 4. New servers 'X' and 'Y' show up and "D" goes from active to inactive tracker = tracker.computeNewHostStatus(getHostSet("X", "Y", "B", "E", "J"), getHostSet("A", "C", "D", "H", "F")); verifySet(tracker.getActiveHosts(), "X", "Y", "B", "E", "J"); verifySet(tracker.getInactiveHosts(), "C", "A", "H", "D", "F"); // Round 5. server "B" goes MISSING tracker = tracker.computeNewHostStatus(getHostSet("X", "Y", "E", "J"), getHostSet("A", "C", "D", "H", "F")); verifySet(tracker.getActiveHosts(), "X", "Y", "E", "J"); verifySet(tracker.getInactiveHosts(), "C", "A", "H", "D", "F", "B"); // Round 6. server "E" and "J" go MISSING and new server "K" shows up and "A" and "C" go from inactive to active tracker = tracker.computeNewHostStatus(getHostSet("X", "Y", "A", "K", "C"), getHostSet("D", "H", "F")); verifySet(tracker.getActiveHosts(), "X", "Y", "A", "C", "K"); verifySet(tracker.getInactiveHosts(), "H", "D", "F", "E", "J"); // Round 7. all active hosts go from active to inactive tracker = tracker.computeNewHostStatus(getHostSet(), getHostSet("D", "H", "F", "X", "Y", "A", "K", "C")); verifySet(tracker.getActiveHosts(), ""); verifySet(tracker.getInactiveHosts(), "H", "D", "F", "X", "Y", "A", "K", "C"); // Round 8. 'X' 'Y' 'A' and 'C' go from inactive to active and 'K' disappears from down list tracker = tracker.computeNewHostStatus(getHostSet("X", "Y", "A", "C"), getHostSet("D", "H", "F")); verifySet(tracker.getActiveHosts(), "X", "Y", "A", "C"); verifySet(tracker.getInactiveHosts(), "H", "D", "F"); // Round 9. All inactive hosts disappear tracker = tracker.computeNewHostStatus(getHostSet("X", "Y", "A", "C"), getHostSet()); verifySet(tracker.getActiveHosts(), "X", "Y", "A", "C"); verifySet(tracker.getInactiveHosts(), ""); // Round 9. All active hosts disappear tracker = tracker.computeNewHostStatus(getHostSet(), getHostSet("K", "J")); verifySet(tracker.getActiveHosts(), ""); verifySet(tracker.getInactiveHosts(), "J", "K", "X", "Y", "A", "C"); // Round 10. All hosts disappear tracker = tracker.computeNewHostStatus(getHostSet(), getHostSet()); verifySet(tracker.getActiveHosts(), ""); verifySet(tracker.getInactiveHosts(), ""); } private Set<Host> getHostSet(String... names) { Set<Host> set = new HashSet<Host>(); if (names != null && names.length > 0) { for (String name : names) { if (!name.isEmpty()) { set.add(new HostBuilder().setHostname(name).setPort(1234).setRack("r1").createHost()); } } } return set; } private void verifySet(Collection<Host> hosts, String... names) { Set<String> expected = new HashSet<String>(); if (names != null && names.length > 0) { for (String n : names) { if (n != null && !n.isEmpty()) { expected.add(n); } } } Set<String> result = new HashSet<String>(CollectionUtils.transform(hosts, new Transform<Host, String>() { @Override public String get(Host x) { return x.getHostAddress(); } })); Assert.assertEquals(expected, result); } }
5,978
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/HostConnectionPoolImplTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl; import com.netflix.dyno.connectionpool.AsyncOperation; import com.netflix.dyno.connectionpool.Connection; import com.netflix.dyno.connectionpool.ConnectionContext; import com.netflix.dyno.connectionpool.ConnectionFactory; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.HostBuilder; import com.netflix.dyno.connectionpool.HostConnectionPool; import com.netflix.dyno.connectionpool.ListenableFuture; import com.netflix.dyno.connectionpool.Operation; import com.netflix.dyno.connectionpool.OperationResult; import com.netflix.dyno.connectionpool.exception.DynoConnectException; import com.netflix.dyno.connectionpool.exception.DynoException; import com.netflix.dyno.connectionpool.exception.FatalConnectionException; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; public class HostConnectionPoolImplTest { private static final Host TestHost = new HostBuilder().setHostname("TestHost").setIpAddress("TestAddress").setPort(1234).setRack("TestRack").createHost(); // TEST UTILS SETUP private class TestClient { } //private static AtomicBoolean stop = new AtomicBoolean(false); private static HostConnectionPoolImpl<TestClient> pool; private static ExecutorService threadPool; private static int numWorkers = 10; private static class TestConnection implements Connection<TestClient> { private DynoConnectException ex; private HostConnectionPool<TestClient> myPool; private TestConnection(HostConnectionPool<TestClient> pool) { myPool = pool; } @Override public <R> OperationResult<R> execute(Operation<TestClient, R> op) throws DynoException { return null; } @Override public void close() { } @Override public Host getHost() { return TestHost; } @Override public void open() throws DynoException { } @Override public DynoConnectException getLastException() { return ex; } @Override public HostConnectionPool<TestClient> getParentConnectionPool() { return myPool; } public void setException(DynoConnectException e) { ex = e; } @Override public <R> ListenableFuture<OperationResult<R>> executeAsync(AsyncOperation<TestClient, R> op) throws DynoException { throw new RuntimeException("Not Implemented"); } @Override public void execPing() { // do nothing } @Override public ConnectionContext getContext() { return null; } } private static ConnectionFactory<TestClient> connFactory = new ConnectionFactory<TestClient>() { @Override public Connection<TestClient> createConnection(HostConnectionPool<TestClient> pool) throws DynoConnectException { return new TestConnection(pool); } @Override public Connection<TestClient> createConnectionWithDataStore(HostConnectionPool<TestClient> pool) throws DynoConnectException { return null; } @Override public Connection<TestClient> createConnectionWithConsistencyLevel(HostConnectionPool<TestClient> pool, String consistency) throws DynoConnectException { return null; } }; private static ConnectionPoolConfigurationImpl config = new ConnectionPoolConfigurationImpl("TestClient"); private static CountingConnectionPoolMonitor cpMonitor = new CountingConnectionPoolMonitor(); @BeforeClass public static void beforeClass() { threadPool = Executors.newFixedThreadPool(numWorkers); } @Before public void beforeTest() { //stop.set(false); cpMonitor = new CountingConnectionPoolMonitor(); // reset all monitor stats } @After public void afterTest() { if (pool != null) { pool.shutdown(); } } @AfterClass public static void afterClass() { threadPool.shutdownNow(); } @Test public void testRegularProcess() throws Exception { final BasicResult result = new BasicResult(); final TestControl control = new TestControl(4); pool = new HostConnectionPoolImpl<TestClient>(TestHost, connFactory, config, cpMonitor); int numConns = pool.primeConnections(); for (int i = 0; i < 4; i++) { threadPool.submit(new BasicWorker(result, control)); } Thread.sleep(300); control.stop(); control.waitOnFinish(); pool.shutdown(); Thread.sleep(300); Assert.assertEquals(config.getMaxConnsPerHost(), numConns); int expected = result.successCount.get(); Assert.assertTrue(expected - cpMonitor.getConnectionBorrowedCount() <= 5); Assert.assertTrue(expected - cpMonitor.getConnectionReturnedCount() <= 5); Assert.assertEquals(config.getMaxConnsPerHost(), cpMonitor.getConnectionCreatedCount()); Assert.assertEquals(config.getMaxConnsPerHost(), cpMonitor.getConnectionClosedCount()); Assert.assertEquals(0, result.failureCount.get()); } @Test public void testPoolTimeouts() throws Exception { pool = new HostConnectionPoolImpl<TestClient>(TestHost, connFactory, config, cpMonitor); int numConns = pool.primeConnections(); final BasicResult result = new BasicResult(); final TestControl control = new TestControl(4); for (int i = 0; i < 5; i++) { // Note 5 threads .. which is more than the no of available conns .. hence we should see timeouts threadPool.submit(new BasicWorker(result, control, 55)); } Thread.sleep(300); control.stop(); control.waitOnFinish(); pool.shutdown(); Thread.sleep(300); Assert.assertEquals(config.getMaxConnsPerHost(), numConns); int expected = result.successCount.get(); Assert.assertTrue(expected - cpMonitor.getConnectionBorrowedCount() <= 5); Assert.assertTrue(expected - cpMonitor.getConnectionReturnedCount() <= 5); Assert.assertEquals(config.getMaxConnsPerHost(), cpMonitor.getConnectionCreatedCount()); Assert.assertEquals(config.getMaxConnsPerHost(), cpMonitor.getConnectionClosedCount()); Assert.assertEquals(0, cpMonitor.getConnectionCreateFailedCount()); Assert.assertTrue(result.failureCount.get() > 0); } @Test public void testMarkHostAsDown() throws Exception { pool = new HostConnectionPoolImpl<TestClient>(TestHost, connFactory, config, cpMonitor); int numConns = pool.primeConnections(); final BasicResult result = new BasicResult(); final TestControl control = new TestControl(4); for (int i = 0; i < 4; i++) { // Note 4 threads .. which is more than the no of available conns .. hence we should see timeouts threadPool.submit(new BasicWorker(result, control)); } Thread.sleep(500); Assert.assertTrue(result.opCount.get() > 0); Assert.assertEquals(0, result.failureCount.get()); pool.markAsDown(new FatalConnectionException("mark pool as down")); Thread.sleep(200); control.stop(); control.waitOnFinish(); pool.shutdown(); Assert.assertEquals(config.getMaxConnsPerHost(), numConns); Assert.assertEquals(result.successCount.get(), cpMonitor.getConnectionBorrowedCount()); Assert.assertEquals(result.successCount.get(), cpMonitor.getConnectionReturnedCount()); Assert.assertEquals(config.getMaxConnsPerHost(), cpMonitor.getConnectionCreatedCount()); Assert.assertEquals(config.getMaxConnsPerHost(), cpMonitor.getConnectionClosedCount()); Assert.assertEquals(0, cpMonitor.getConnectionCreateFailedCount()); Assert.assertTrue(result.failureCount.get() > 0); } private class BasicWorker implements Callable<Void> { private final BasicResult result; private final TestControl control; private int sleepMs = -1; private BasicWorker(BasicResult result, TestControl testControl) { this.result = result; this.control = testControl; } private BasicWorker(BasicResult result, TestControl testControl, int sleep) { this.result = result; this.control = testControl; this.sleepMs = sleep; } @Override public Void call() throws Exception { while (!control.isStopped() && !Thread.currentThread().isInterrupted()) { Connection<TestClient> connection = null; try { connection = pool.borrowConnection(100, TimeUnit.MILLISECONDS); if (sleepMs > 0) { Thread.sleep(sleepMs); } pool.returnConnection(connection); result.successCount.incrementAndGet(); result.lastSuccess.set(true); } catch (InterruptedException e) { } catch (DynoConnectException e) { result.failureCount.incrementAndGet(); result.lastSuccess.set(false); if (connection != null) { ((TestConnection) connection).setException(e); } } finally { result.opCount.incrementAndGet(); } } control.reportFinish(); return null; } } private class TestControl { private final AtomicBoolean stop = new AtomicBoolean(false); private final CountDownLatch latch; private TestControl(int n) { latch = new CountDownLatch(n); } private void reportFinish() { latch.countDown(); } private void waitOnFinish() throws InterruptedException { latch.await(); } private boolean isStopped() { return stop.get(); } private void stop() { stop.set(true); } } private class BasicResult { private final AtomicInteger opCount = new AtomicInteger(0); private final AtomicInteger successCount = new AtomicInteger(0); private final AtomicInteger failureCount = new AtomicInteger(0); private AtomicBoolean lastSuccess = new AtomicBoolean(false); private BasicResult() { } @Override public String toString() { return "BasicResult [opCount=" + opCount + ", successCount=" + successCount + ", failureCount=" + failureCount + ", lastSuccess=" + lastSuccess.get() + "]"; } } }
5,979
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/ConnectionPoolImplTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl; import com.netflix.dyno.connectionpool.AsyncOperation; import com.netflix.dyno.connectionpool.Connection; import com.netflix.dyno.connectionpool.ConnectionContext; import com.netflix.dyno.connectionpool.ConnectionFactory; import com.netflix.dyno.connectionpool.ConnectionPoolConfiguration.LoadBalancingStrategy; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.Host.Status; import com.netflix.dyno.connectionpool.HostBuilder; import com.netflix.dyno.connectionpool.HostConnectionPool; import com.netflix.dyno.connectionpool.HostConnectionStats; import com.netflix.dyno.connectionpool.HostSupplier; import com.netflix.dyno.connectionpool.ListenableFuture; import com.netflix.dyno.connectionpool.Operation; import com.netflix.dyno.connectionpool.OperationResult; import com.netflix.dyno.connectionpool.RetryPolicy; import com.netflix.dyno.connectionpool.RetryPolicy.RetryPolicyFactory; import com.netflix.dyno.connectionpool.TokenMapSupplier; import com.netflix.dyno.connectionpool.exception.DynoConnectException; import com.netflix.dyno.connectionpool.exception.DynoException; import com.netflix.dyno.connectionpool.exception.FatalConnectionException; import com.netflix.dyno.connectionpool.exception.NoAvailableHostsException; import com.netflix.dyno.connectionpool.exception.PoolExhaustedException; import com.netflix.dyno.connectionpool.exception.PoolOfflineException; import com.netflix.dyno.connectionpool.exception.PoolTimeoutException; import com.netflix.dyno.connectionpool.exception.ThrottledException; import com.netflix.dyno.connectionpool.impl.ConnectionPoolConfigurationImpl.ErrorRateMonitorConfigImpl; import com.netflix.dyno.connectionpool.impl.lb.HostToken; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; public class ConnectionPoolImplTest { private static class TestClient { private final AtomicInteger ops = new AtomicInteger(0); } private static TestClient client = new TestClient(); private static ConnectionPoolConfigurationImpl cpConfig = new ConnectionPoolConfigurationImpl("TestClient"); private static CountingConnectionPoolMonitor cpMonitor = new CountingConnectionPoolMonitor(); private static class TestConnection implements Connection<TestClient> { private AtomicInteger ops = new AtomicInteger(0); private DynoConnectException ex; private HostConnectionPool<TestClient> hostPool; private TestConnection(HostConnectionPool<TestClient> pool) { this.hostPool = pool; } @Override public <R> OperationResult<R> execute(Operation<TestClient, R> op) throws DynoException { try { if (op != null) { R r = op.execute(client, null); return new OperationResultImpl<R>("Test", r, null); } } catch (DynoConnectException e) { ex = e; throw e; } finally { ops.incrementAndGet(); } return null; } @Override public void close() { } @Override public Host getHost() { return hostPool.getHost(); } @Override public void open() throws DynoException { } @Override public DynoConnectException getLastException() { return ex; } @Override public HostConnectionPool<TestClient> getParentConnectionPool() { return hostPool; } @Override public <R> ListenableFuture<OperationResult<R>> executeAsync(AsyncOperation<TestClient, R> op) throws DynoException { throw new RuntimeException("Not Implemented"); } @Override public void execPing() { } @Override public ConnectionContext getContext() { return new ConnectionContextImpl(); } } private static ConnectionFactory<TestClient> connFactory = new ConnectionFactory<TestClient>() { @Override public Connection<TestClient> createConnection(HostConnectionPool<TestClient> pool) throws DynoConnectException, ThrottledException { return new TestConnection(pool); } @Override public Connection<TestClient> createConnectionWithDataStore(HostConnectionPool<TestClient> pool) throws DynoConnectException { return null; } @Override public Connection<TestClient> createConnectionWithConsistencyLevel(HostConnectionPool<TestClient> pool, String consistency) throws DynoConnectException { return null; } }; private Host host1 = new HostBuilder().setHostname("host1").setPort(8080).setRack("localRack").setStatus(Status.Up).createHost(); private Host host2 = new HostBuilder().setHostname("host2").setPort(8080).setRack("localRack").setStatus(Status.Up).createHost(); private Host host3 = new HostBuilder().setHostname("host3").setPort(8080).setRack("localRack").setStatus(Status.Up).createHost(); // Used for Cross Rack fallback testing private Host host4 = new HostBuilder().setHostname("host4").setPort(8080).setRack("remoteRack").setStatus(Status.Up).createHost(); private Host host5 = new HostBuilder().setHostname("host5").setPort(8080).setRack("remoteRack").setStatus(Status.Up).createHost(); private Host host6 = new HostBuilder().setHostname("host6").setPort(8080).setRack("remoteRack").setStatus(Status.Up).createHost(); private final List<Host> hostSupplierHosts = new ArrayList<Host>(); @Before public void beforeTest() { hostSupplierHosts.clear(); client = new TestClient(); cpConfig = new ConnectionPoolConfigurationImpl("TestClient").setLoadBalancingStrategy(LoadBalancingStrategy.RoundRobin); cpConfig.withHostSupplier(new HostSupplier() { @Override public List<Host> getHosts() { return hostSupplierHosts; } }); cpConfig.setLocalRack("localRack"); cpConfig.setLoadBalancingStrategy(LoadBalancingStrategy.RoundRobin); cpConfig.withTokenSupplier(getTokenMapSupplier()); cpMonitor = new CountingConnectionPoolMonitor(); } @Test public void testConnectionPoolNormal() throws Exception { final ConnectionPoolImpl<TestClient> pool = new ConnectionPoolImpl<TestClient>(connFactory, cpConfig, cpMonitor); hostSupplierHosts.add(host1); hostSupplierHosts.add(host2); pool.start(); final Callable<Void> testLogic = new Callable<Void>() { @Override public Void call() throws Exception { Thread.sleep(1000); return null; } }; try { runTest(pool, testLogic); checkConnectionPoolMonitorStats(2); } finally { pool.shutdown(); } } private void checkConnectionPoolMonitorStats(int numHosts) { checkConnectionPoolMonitorStats(numHosts, false); } private void checkConnectionPoolMonitorStats(int numHosts, boolean fallback) { System.out.println("Total ops: " + client.ops.get()); Assert.assertTrue("Total ops: " + client.ops.get(), client.ops.get() > 0); Assert.assertEquals(client.ops.get(), cpMonitor.getOperationSuccessCount()); if (!fallback) { Assert.assertEquals(0, cpMonitor.getOperationFailureCount()); } Assert.assertEquals(0, cpMonitor.getOperationTimeoutCount()); Assert.assertEquals(numHosts * cpConfig.getMaxConnsPerHost(), cpMonitor.getConnectionCreatedCount()); Assert.assertEquals(0, cpMonitor.getConnectionCreateFailedCount()); Assert.assertEquals(numHosts * cpConfig.getMaxConnsPerHost(), cpMonitor.getConnectionClosedCount()); Assert.assertEquals(client.ops.get(), cpMonitor.getConnectionBorrowedCount()); Assert.assertEquals(client.ops.get(), cpMonitor.getConnectionReturnedCount()); } private TokenMapSupplier getTokenMapSupplier() { /** cqlsh:dyno_bootstrap> select "availabilityZone","hostname","token" from tokens where "appId" = 'dynomite_redis_puneet'; availabilityZone | hostname | token ------------------+--------------------------------------------+------------ us-east-1c | ec2-54-83-179-213.compute-1.amazonaws.com | 1383429731 us-east-1c | ec2-54-224-184-99.compute-1.amazonaws.com | 309687905 us-east-1c | ec2-54-91-190-159.compute-1.amazonaws.com | 3530913377 us-east-1c | ec2-54-81-31-218.compute-1.amazonaws.com | 2457171554 us-east-1e | ec2-54-198-222-153.compute-1.amazonaws.com | 309687905 us-east-1e | ec2-54-198-239-231.compute-1.amazonaws.com | 2457171554 us-east-1e | ec2-54-226-212-40.compute-1.amazonaws.com | 1383429731 us-east-1e | ec2-54-197-178-229.compute-1.amazonaws.com | 3530913377 cqlsh:dyno_bootstrap> */ final Map<Host, HostToken> tokenMap = new HashMap<Host, HostToken>(); tokenMap.put(host1, new HostToken(309687905L, host1)); tokenMap.put(host2, new HostToken(1383429731L, host2)); tokenMap.put(host3, new HostToken(2457171554L, host3)); tokenMap.put(host4, new HostToken(309687905L, host4)); tokenMap.put(host5, new HostToken(1383429731L, host5)); tokenMap.put(host6, new HostToken(2457171554L, host6)); return new TokenMapSupplier() { @Override public List<HostToken> getTokens(Set<Host> activeHosts) { if (activeHosts.size() < tokenMap.size()) { List<HostToken> hostTokens = new ArrayList<HostToken>(activeHosts.size()); Iterator<Host> iterator = activeHosts.iterator(); while (iterator.hasNext()) { Host activeHost = (Host) iterator.next(); hostTokens.add(tokenMap.get(activeHost)); } return hostTokens; } else { return new ArrayList<HostToken>(tokenMap.values()); } } @Override public HostToken getTokenForHost(Host host, Set<Host> activeHosts) { return tokenMap.get(host); } }; } @Test public void testAddingNewHosts() throws Exception { final ConnectionPoolImpl<TestClient> pool = new ConnectionPoolImpl<TestClient>(connFactory, cpConfig, cpMonitor); hostSupplierHosts.add(host1); hostSupplierHosts.add(host2); pool.start(); final Callable<Void> testLogic = new Callable<Void>() { @Override public Void call() throws Exception { Thread.sleep(1000); pool.addHost(host3); Thread.sleep(1000); return null; } }; runTest(pool, testLogic); checkConnectionPoolMonitorStats(3); checkHostStats(host1); checkHostStats(host2); checkHostStats(host3); HostConnectionStats h1Stats = cpMonitor.getHostStats().get(host1); HostConnectionStats h2Stats = cpMonitor.getHostStats().get(host2); HostConnectionStats h3Stats = cpMonitor.getHostStats().get(host3); Assert.assertTrue("h3Stats: " + h3Stats + " h1Stats: " + h1Stats, h1Stats.getOperationSuccessCount() > h3Stats.getOperationSuccessCount()); Assert.assertTrue("h3Stats: " + h3Stats + " h2Stats: " + h2Stats, h2Stats.getOperationSuccessCount() > h3Stats.getOperationSuccessCount()); } private void checkHostStats(Host host) { HostConnectionStats hStats = cpMonitor.getHostStats().get(host); Assert.assertTrue("host ops: " + hStats.getOperationSuccessCount(), hStats.getOperationSuccessCount() > 0); Assert.assertEquals(0, hStats.getOperationErrorCount()); Assert.assertEquals(cpConfig.getMaxConnsPerHost(), hStats.getConnectionsCreated()); Assert.assertEquals(0, hStats.getConnectionsCreateFailed()); Assert.assertEquals(cpConfig.getMaxConnsPerHost(), hStats.getConnectionsClosed()); Assert.assertEquals(hStats.getOperationSuccessCount(), hStats.getConnectionsBorrowed()); Assert.assertEquals(hStats.getOperationSuccessCount(), hStats.getConnectionsReturned()); } @Test public void testRemovingHosts() throws Exception { final ConnectionPoolImpl<TestClient> pool = new ConnectionPoolImpl<TestClient>(connFactory, cpConfig, cpMonitor); hostSupplierHosts.add(host1); hostSupplierHosts.add(host2); hostSupplierHosts.add(host3); pool.start(); final Callable<Void> testLogic = new Callable<Void>() { @Override public Void call() throws Exception { Thread.sleep(1000); pool.removeHost(host2); Thread.sleep(1000); return null; } }; runTest(pool, testLogic); checkConnectionPoolMonitorStats(3); checkHostStats(host1); checkHostStats(host2); checkHostStats(host3); HostConnectionStats h1Stats = cpMonitor.getHostStats().get(host1); HostConnectionStats h2Stats = cpMonitor.getHostStats().get(host2); HostConnectionStats h3Stats = cpMonitor.getHostStats().get(host3); Assert.assertTrue("h1Stats: " + h1Stats + " h2Stats: " + h2Stats, h1Stats.getOperationSuccessCount() > h2Stats.getOperationSuccessCount()); Assert.assertTrue("h2Stats: " + h2Stats + " h3Stats: " + h3Stats, h3Stats.getOperationSuccessCount() > h2Stats.getOperationSuccessCount()); } @Test(expected = NoAvailableHostsException.class) public void testNoAvailableHosts() throws Exception { final ConnectionPoolImpl<TestClient> pool = new ConnectionPoolImpl<TestClient>(connFactory, cpConfig, cpMonitor); pool.start(); try { executeTestClientOperation(pool); } finally { pool.shutdown(); } } @Test public void testIdleWhenNoAvailableHosts() throws Exception { final ConnectionPoolImpl<TestClient> pool = new ConnectionPoolImpl<TestClient>(connFactory, cpConfig, cpMonitor); try { pool.start(); } catch (NoAvailableHostsException nah) { pool.idle(); Thread.sleep(1000); // calling idle() again should have no effect and will throw an exception if the pool has already been // started pool.idle(); } finally { pool.shutdown(); } } @Test public void testPoolTimeout() throws Exception { final ConnectionPoolImpl<TestClient> pool = new ConnectionPoolImpl<TestClient>(connFactory, cpConfig, cpMonitor); hostSupplierHosts.add(host1); hostSupplierHosts.add(host2); hostSupplierHosts.add(host3); pool.start(); // Now exhaust all 9 connections, so that the 10th one can fail with PoolExhaustedException final ExecutorService threadPool = Executors.newFixedThreadPool(9); final Callable<Void> blockConnectionForSomeTime = new Callable<Void>() { @Override public Void call() throws Exception { try { Thread.sleep(10000); // sleep for a VERY long time to ensure pool exhaustion } catch (InterruptedException e) { // just return } return null; } }; final CountDownLatch latch = new CountDownLatch(9); for (int i = 0; i < 9; i++) { threadPool.submit(new Callable<Void>() { @Override public Void call() throws Exception { latch.countDown(); executeTestClientOperation(pool, blockConnectionForSomeTime); return null; } }); } latch.await(); Thread.sleep(100); // wait patiently for all threads to have blocked the connections try { executeTestClientOperation(pool); Assert.fail("TEST FAILED"); } catch (PoolTimeoutException e) { threadPool.shutdownNow(); pool.shutdown(); } } @Test(expected = PoolOfflineException.class) public void testPoolOffline() { final ConnectionPoolImpl<TestClient> pool = new ConnectionPoolImpl<TestClient>(connFactory, cpConfig, cpMonitor); hostSupplierHosts.add(host1); pool.start(); // The test logic is simply to throw an exception so that errors will recorded by the health tracker // which will mark the pool as Down final Callable<Void> testLogic = new Callable<Void>() { @Override public Void call() throws Exception { throw new PoolExhaustedException(pool.getHostPool(host1), "pool exhausted"); } }; try { executeTestClientOperation(pool, testLogic); } finally { pool.shutdown(); } } @Test public void testHostEvictionDueToErrorRates() throws Exception { // First configure the error rate monitor ErrorRateMonitorConfigImpl errConfig = new ErrorRateMonitorConfigImpl(); errConfig.checkFrequency = 1; errConfig.window = 1; errConfig.suppressWindow = 60; errConfig.addThreshold(10, 1, 100); final AtomicReference<String> badHost = new AtomicReference<String>(); final ConnectionFactory<TestClient> badConnectionFactory = new ConnectionFactory<TestClient>() { @Override public Connection<TestClient> createConnection(final HostConnectionPool<TestClient> pool) throws DynoConnectException { return new TestConnection(pool) { @Override public <R> OperationResult<R> execute(Operation<TestClient, R> op) throws DynoException { if (pool.getHost().getHostAddress().equals(badHost.get())) { throw new FatalConnectionException("Fail for bad host"); } return super.execute(op); } }; } @Override public Connection<TestClient> createConnectionWithDataStore(HostConnectionPool<TestClient> pool) throws DynoConnectException { return null; } @Override public Connection<TestClient> createConnectionWithConsistencyLevel(HostConnectionPool<TestClient> pool, String consistency) throws DynoConnectException { return null; } }; final ConnectionPoolImpl<TestClient> pool = new ConnectionPoolImpl<TestClient>(badConnectionFactory, cpConfig, cpMonitor); hostSupplierHosts.add(host1); hostSupplierHosts.add(host2); hostSupplierHosts.add(host3); pool.start(); final Callable<Void> testLogic = new Callable<Void>() { @Override public Void call() throws Exception { Thread.sleep(2000); badHost.set("host2"); Thread.sleep(2000); return null; } }; runTest(pool, testLogic); Assert.assertTrue("Total ops: " + client.ops.get(), client.ops.get() > 0); Assert.assertTrue("Total errors: " + cpMonitor.getOperationFailureCount(), cpMonitor.getOperationFailureCount() > 0); Assert.assertEquals(3 * cpConfig.getMaxConnsPerHost(), cpMonitor.getConnectionCreatedCount()); Assert.assertEquals(0, cpMonitor.getConnectionCreateFailedCount()); Assert.assertEquals(3 * cpConfig.getMaxConnsPerHost(), cpMonitor.getConnectionClosedCount()); Assert.assertEquals(client.ops.get() + cpMonitor.getOperationFailureCount(), cpMonitor.getConnectionBorrowedCount()); Assert.assertEquals(client.ops.get() + cpMonitor.getOperationFailureCount(), cpMonitor.getConnectionReturnedCount()); checkHostStats(host1); checkHostStats(host3); HostConnectionStats h2Stats = cpMonitor.getHostStats().get(host2); Assert.assertEquals(cpMonitor.getOperationFailureCount(), h2Stats.getOperationErrorCount()); } @Test public void testCrossRackFailover() throws Exception { final RetryNTimes retry = new RetryNTimes(3, true); final RetryPolicyFactory rFactory = new RetryNTimes.RetryPolicyFactory() { @Override public RetryPolicy getRetryPolicy() { return retry; } }; cpConfig.setRetryPolicyFactory(rFactory); int numHosts = 6; final ConnectionPoolImpl<TestClient> pool = new ConnectionPoolImpl<TestClient>(connFactory, cpConfig, cpMonitor); hostSupplierHosts.add(host1); hostSupplierHosts.add(host2); hostSupplierHosts.add(host3); hostSupplierHosts.add(host4); hostSupplierHosts.add(host5); hostSupplierHosts.add(host6); pool.start(); final Callable<Void> testLogic = new Callable<Void>() { Integer count = 0; @Override public Void call() throws Exception { if (count == 0) { ++count; throw new DynoException("1st try - FAILURE"); } else { Thread.sleep(1000); } return null; } }; try { executeTestClientOperation(pool, testLogic); System.out.println("Total ops: " + client.ops.get()); Assert.assertTrue("Total ops: " + client.ops.get(), client.ops.get() > 0); Assert.assertEquals(client.ops.get(), cpMonitor.getOperationSuccessCount()); Assert.assertEquals(1, cpMonitor.getOperationFailureCount()); Assert.assertEquals(0, cpMonitor.getOperationTimeoutCount()); Assert.assertEquals(numHosts * cpConfig.getMaxConnsPerHost(), cpMonitor.getConnectionCreatedCount()); Assert.assertEquals(0, cpMonitor.getConnectionCreateFailedCount()); } finally { pool.shutdown(); } } @Test public void testWithRetries() { final ConnectionFactory<TestClient> badConnectionFactory = new ConnectionFactory<TestClient>() { @Override public Connection<TestClient> createConnection(final HostConnectionPool<TestClient> pool) throws DynoConnectException { return new TestConnection(pool) { @Override public <R> OperationResult<R> execute(Operation<TestClient, R> op) throws DynoException { throw new DynoException("Fail for bad host"); } }; } @Override public Connection<TestClient> createConnectionWithDataStore(HostConnectionPool<TestClient> pool) throws DynoConnectException { return null; } @Override public Connection<TestClient> createConnectionWithConsistencyLevel(HostConnectionPool<TestClient> pool, String consistency) throws DynoConnectException { return null; } }; final RetryNTimes retry = new RetryNTimes(3, false); final RetryPolicyFactory rFactory = new RetryNTimes.RetryPolicyFactory() { @Override public RetryPolicy getRetryPolicy() { return retry; } }; final ConnectionPoolImpl<TestClient> pool = new ConnectionPoolImpl<TestClient>(badConnectionFactory, cpConfig.setRetryPolicyFactory(rFactory), cpMonitor); hostSupplierHosts.add(host1); pool.start(); try { executeTestClientOperation(pool, null); Assert.fail("Test failed: expected PoolExhaustedException"); } catch (DynoException e) { Assert.assertEquals("Retry: " + retry.getAttemptCount(), 4, retry.getAttemptCount()); } finally { pool.shutdown(); } } @Test(expected = NoAvailableHostsException.class) public void testHostsDownDuringStartup() { final ConnectionPoolImpl<TestClient> pool = new ConnectionPoolImpl<TestClient>(connFactory, cpConfig, cpMonitor); hostSupplierHosts.add(new HostBuilder().setHostname("host1_down").setPort(8080).setRack("localRack").setStatus(Status.Down).createHost()); hostSupplierHosts.add(new HostBuilder().setHostname("host2_down").setPort(8080).setRack("localRack").setStatus(Status.Down).createHost()); hostSupplierHosts.add(new HostBuilder().setHostname("host3_down").setPort(8080).setRack("localRack").setStatus(Status.Down).createHost()); pool.start(); } private void executeTestClientOperation(final ConnectionPoolImpl<TestClient> pool) { executeTestClientOperation(pool, null); } private void executeTestClientOperation(final ConnectionPoolImpl<TestClient> pool, final Callable<Void> customLogic) { pool.executeWithFailover(new Operation<TestClient, Integer>() { @Override public Integer execute(TestClient client, ConnectionContext state) throws DynoException { if (customLogic != null) { try { customLogic.call(); } catch (DynoException de) { throw de; } catch (Exception e) { throw new RuntimeException(e); } } client.ops.incrementAndGet(); return 1; } @Override public String getName() { return "TestOperation"; } @Override public String getStringKey() { return "TestOperation"; } @Override public byte[] getBinaryKey() { return null; } }); } private void runTest(final ConnectionPoolImpl<TestClient> pool, final Callable<Void> customTestLogic) throws Exception { int nThreads = 1; final ExecutorService threadPool = Executors.newFixedThreadPool(nThreads); final AtomicBoolean stop = new AtomicBoolean(false); final CountDownLatch latch = new CountDownLatch(nThreads); for (int i = 0; i < nThreads; i++) { threadPool.submit(new Callable<Void>() { @Override public Void call() throws Exception { try { while (!stop.get() && !Thread.currentThread().isInterrupted()) { try { pool.executeWithFailover(new Operation<TestClient, Integer>() { @Override public Integer execute(TestClient client, ConnectionContext state) throws DynoException { client.ops.incrementAndGet(); return 1; } @Override public String getName() { return "TestOperation"; } @Override public String getStringKey() { return "TestOperation"; } @Override public byte[] getBinaryKey() { return null; } }); } catch (DynoException e) { // System.out.println("FAILED Test Worker operation: " + e.getMessage()); // e.printStackTrace(); } } } finally { latch.countDown(); } return null; } }); } customTestLogic.call(); stop.set(true); latch.await(); threadPool.shutdownNow(); pool.shutdown(); } }
5,980
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/hash/BinarySearchTokenMapperTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.hash; import com.netflix.dyno.connectionpool.Host.Status; import com.netflix.dyno.connectionpool.HostBuilder; import com.netflix.dyno.connectionpool.impl.lb.HostToken; import org.junit.Assert; import org.junit.Test; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.concurrent.atomic.AtomicLong; public class BinarySearchTokenMapperTest { @Test public void testSearchToken() throws Exception { final BinarySearchTokenMapper tokenMapper = new BinarySearchTokenMapper(new Murmur1HashPartitioner()); tokenMapper.initSearchMechanism(getTestTokens()); Long failures = 0L; failures += runTest(309687905L - 1000000L, 309687905L, "h1", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); failures += runTest(309687905L + 1L, 309687905L + 1000000L, "h2", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); failures += runTest(1383429731L + 1L, 1383429731L + 1000000L, "h3", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); failures += runTest(2457171554L + 1L, 2457171554L + 1000000L, "h4", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); failures += runTest(3530913377L + 1L, 3530913377L + 1000000L, "h1", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); } @Test public void testAddToken() throws Exception { final BinarySearchTokenMapper tokenMapper = new BinarySearchTokenMapper(new Murmur1HashPartitioner()); tokenMapper.initSearchMechanism(getTestTokens()); Long failures = 0L; failures += runTest(309687905L + 1L, 309687905L + 1000000L, "h2", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); failures += runTest(1383429731L + 1L, 1383429731L + 1000000L, "h3", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); // Now construct the midpoint token between 'h2' and 'h3' Long midpoint = 309687905L + (1383429731L - 309687905L) / 2; tokenMapper.addHostToken(new HostToken(midpoint, new HostBuilder().setHostname("h23").setPort(-1).setRack("r1").setStatus(Status.Up).createHost())); failures += runTest(309687905L + 1L, 309687905L + 10L, "h23", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); failures += runTest(1383429731L + 1L, 1383429731L + 1000000L, "h3", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); } @Test public void testRemoveToken() throws Exception { final BinarySearchTokenMapper tokenMapper = new BinarySearchTokenMapper(new Murmur1HashPartitioner()); tokenMapper.initSearchMechanism(getTestTokens()); Long failures = 0L; failures += runTest(309687905L + 1L, 309687905L + 1000000L, "h2", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); failures += runTest(1383429731L + 1L, 1383429731L + 1000000L, "h3", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); // Now remove token 'h3' tokenMapper.remoteHostToken(new HostToken(1383429731L, new HostBuilder().setHostname("h2").setPort(-1).setRack("r1").setStatus(Status.Up).createHost())); failures += runTest(309687905L + 1L, 309687905L + 10L, "h3", tokenMapper); Assert.assertTrue("Failures: " + failures, failures == 0); } private long runTest(Long start, Long end, final String expectedToken, final BinarySearchTokenMapper tokenMapper) { final AtomicLong failures = new AtomicLong(0L); final AtomicLong counter = new AtomicLong(start); while (counter.incrementAndGet() <= end) { final long hash = counter.get(); HostToken hToken = tokenMapper.getToken(hash); if (!(hToken.getHost().getHostAddress().equals(expectedToken))) { failures.incrementAndGet(); } } return failures.get(); } private Collection<HostToken> getTestTokens() { /** cqlsh:dyno_bootstrap> select "availabilityZone","hostname","token" from tokens where "appId" = 'dynomite_redis_puneet'; availabilityZone | hostname | token ------------------+--------------------------------------------+------------ us-east-1c | ec2-54-83-179-213.compute-1.amazonaws.com | 1383429731 us-east-1c | ec2-54-224-184-99.compute-1.amazonaws.com | 309687905 us-east-1c | ec2-54-91-190-159.compute-1.amazonaws.com | 3530913377 us-east-1c | ec2-54-81-31-218.compute-1.amazonaws.com | 2457171554 us-east-1e | ec2-54-198-222-153.compute-1.amazonaws.com | 309687905 us-east-1e | ec2-54-198-239-231.compute-1.amazonaws.com | 2457171554 us-east-1e | ec2-54-226-212-40.compute-1.amazonaws.com | 1383429731 us-east-1e | ec2-54-197-178-229.compute-1.amazonaws.com | 3530913377 cqlsh:dyno_bootstrap> */ List<HostToken> tokens = new ArrayList<HostToken>(); tokens.add(new HostToken(309687905L, new HostBuilder().setHostname("h1").setPort(-1).setRack("r1").setStatus(Status.Up).createHost())); tokens.add(new HostToken(1383429731L, new HostBuilder().setHostname("h2").setPort(-1).setRack("r1").setStatus(Status.Up).createHost())); tokens.add(new HostToken(2457171554L, new HostBuilder().setHostname("h3").setPort(-1).setRack("r1").setStatus(Status.Up).createHost())); tokens.add(new HostToken(3530913377L, new HostBuilder().setHostname("h4").setPort(-1).setRack("r1").setStatus(Status.Up).createHost())); return tokens; } }
5,981
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/hash/Murmur1HashPartitionerTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.hash; import java.io.File; import java.io.IOException; import java.util.List; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.impl.utils.IOUtilities; public class Murmur1HashPartitionerTest { @Test public void test1MKeys() throws Exception { Murmur1HashPartitioner hash = new Murmur1HashPartitioner(); List<String> testTokens = readInTestTokens(); for (int i = 0; i < 1000000; i++) { long lHash = hash.hash("" + i); long expected = Long.parseLong(testTokens.get(i)); Assert.assertEquals("Failed for i: " + i, expected, lHash); } } private List<String> readInTestTokens() throws IOException { return IOUtilities.readLines(new File("./src/main/java/TestTokens.txt")); } }
5,982
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/hash/DynoBinarySearchTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.hash; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.impl.hash.DynoBinarySearch.DynoTokenRange; public class DynoBinarySearchTest { @Test public void testTokenRange() throws Exception { DynoTokenRange<Integer> r1 = new DynoTokenRange<Integer>(20, 40); Assert.assertEquals(1, r1.compareTo(10)); Assert.assertEquals(1, r1.compareTo(15)); Assert.assertEquals(1, r1.compareTo(20)); Assert.assertEquals(0, r1.compareTo(22)); Assert.assertEquals(0, r1.compareTo(30)); Assert.assertEquals(0, r1.compareTo(40)); Assert.assertEquals(-1, r1.compareTo(42)); // First Range r1 = new DynoTokenRange<Integer>(null, 40); Assert.assertEquals(0, r1.compareTo(10)); Assert.assertEquals(0, r1.compareTo(15)); Assert.assertEquals(0, r1.compareTo(20)); Assert.assertEquals(0, r1.compareTo(22)); Assert.assertEquals(0, r1.compareTo(30)); Assert.assertEquals(0, r1.compareTo(40)); Assert.assertEquals(-1, r1.compareTo(42)); } @Test public void testTokenSearch() throws Exception { List<Integer> list = Arrays.asList(10, 20, 30, 40, 50, 60, 70, 80, 90, 100); DynoBinarySearch<Integer> search = new DynoBinarySearch<Integer>(list); for (int i = 0; i <= 133; i++) { Integer token = search.getTokenOwner(i); Integer expected = getExpectedToken(i); Assert.assertEquals(expected, token); } } @Test public void testTokenDistribution() throws Exception { List<Long> tokens = Arrays.asList(611697721L, 2043353485L, 3475009249L); DynoBinarySearch<Long> search = new DynoBinarySearch<Long>(tokens); Map<Long, Long> tokenCount = new HashMap<Long, Long>(); tokenCount.put(611697721L, 0L); tokenCount.put(2043353485L, 0L); tokenCount.put(3475009249L, 0L); Murmur1HashPartitioner hash = new Murmur1HashPartitioner(); for (int i = 0; i < 1000000; i++) { // Compute the hash long lHash = hash.hash("" + i); // Now lookup the node Long token = search.getTokenOwner(lHash); Long count = tokenCount.get(token); count++; tokenCount.put(token, count); } long total = 0; for (Long value : tokenCount.values()) { total += value; } for (Long token : tokenCount.keySet()) { Long value = tokenCount.get(token); Long percent = value * 100 / total; Assert.assertTrue("Percentage is off for tokenCount: " + tokenCount, percent >= 30 && percent <= 35); } } private int getExpectedToken(int key) throws Exception { if (key < 10) { return 10; } if (key > 100) { return 10; } if (key % 10 == 0) { return key; } return key + (10 - key % 10); } }
5,983
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/health/RateTrackerTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.health; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.impl.health.RateTracker.Bucket; import com.netflix.dyno.connectionpool.impl.utils.RateLimitUtil; public class RateTrackerTest { @Test public void testProcess() throws Exception { final RateTracker tracker = new RateTracker(20); int numThreads = 5; ExecutorService threadPool = Executors.newFixedThreadPool(numThreads); final AtomicReference<RateLimitUtil> limiter = new AtomicReference<RateLimitUtil>(RateLimitUtil.create(100)); final AtomicBoolean stop = new AtomicBoolean(false); // stats final AtomicInteger totalOps = new AtomicInteger(0); final CyclicBarrier barrier = new CyclicBarrier(numThreads + 1); final CountDownLatch latch = new CountDownLatch(numThreads); for (int i = 0; i < numThreads; i++) { threadPool.submit(new Callable<Void>() { @Override public Void call() throws Exception { barrier.await(); while (!stop.get() && !Thread.currentThread().isInterrupted()) { if (limiter.get().acquire()) { tracker.trackRate(1); totalOps.incrementAndGet(); } } latch.countDown(); return null; } }); } barrier.await(); Thread.sleep(4000); System.out.println("Changing rate to 120"); limiter.set(RateLimitUtil.create(120)); Thread.sleep(4000); System.out.println("Changing rate to 80"); limiter.set(RateLimitUtil.create(80)); Thread.sleep(4000); System.out.println("Changing rate to 200"); limiter.set(RateLimitUtil.create(200)); Thread.sleep(4000); System.out.println("Changing rate to 100"); limiter.set(RateLimitUtil.create(100)); stop.set(true); threadPool.shutdownNow(); //Thread.sleep(100); latch.await(); System.out.println("======================="); System.out.println("Won lock: " + tracker.getWonLockCount()); System.out.println("Total ops: " + totalOps.get()); Assert.assertEquals(20, tracker.rWindow.getQueueSize()); Assert.assertTrue(16 >= tracker.rWindow.getBucketCreateCount()); List<Bucket> allBuckets = tracker.getAllBuckets(); // Remove the first bucket since it's essentially unreliable since that is when the test had stopped. allBuckets.remove(0); for (Bucket b : allBuckets) { System.out.print(" " + b.count()); } System.out.println(""); Assert.assertTrue("P diff failed", 10 >= percentageDiff(200, allBuckets.get(0).count())); Assert.assertTrue("P diff failed", 10 >= percentageDiff(200, allBuckets.get(1).count())); Assert.assertTrue("P diff failed", 10 >= percentageDiff(200, allBuckets.get(2).count())); Assert.assertTrue("P diff failed", 10 >= percentageDiff(80, allBuckets.get(4).count())); Assert.assertTrue("P diff failed", 10 >= percentageDiff(80, allBuckets.get(5).count())); Assert.assertTrue("P diff failed", 10 >= percentageDiff(80, allBuckets.get(6).count())); Assert.assertTrue("P diff failed", 10 >= percentageDiff(120, allBuckets.get(8).count())); Assert.assertTrue("P diff failed", 10 >= percentageDiff(120, allBuckets.get(9).count())); Assert.assertTrue("P diff failed", 10 >= percentageDiff(120, allBuckets.get(10).count())); Assert.assertTrue("P diff failed", 10 >= percentageDiff(100, allBuckets.get(12).count())); Assert.assertTrue("P diff failed", 10 >= percentageDiff(100, allBuckets.get(13).count())); Assert.assertTrue("P diff failed", 10 >= percentageDiff(100, allBuckets.get(14).count())); } private int percentageDiff(int expected, int result) { int pDiff = expected == 0 ? 0 : Math.abs(expected - result) * 100 / expected; System.out.println("Expected: " + expected + " pDiff: " + pDiff); return pDiff; } }
5,984
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/health/ErrorRateMonitorTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.health; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.impl.health.ErrorRateMonitor.SimpleErrorCheckPolicy; import com.netflix.dyno.connectionpool.impl.health.RateTracker.Bucket; import com.netflix.dyno.connectionpool.impl.utils.CollectionUtils; import com.netflix.dyno.connectionpool.impl.utils.RateLimitUtil; public class ErrorRateMonitorTest { @Test public void testSimpleErrorCheckPolicy() throws Exception { List<Bucket> buckets = getBuckets(116, 120, 121, 120, 130, 125, 130, 120, 120, 120); SimpleErrorCheckPolicy policy = new SimpleErrorCheckPolicy(120, 10, 80); Assert.assertTrue(policy.checkErrorRate(buckets)); policy = new SimpleErrorCheckPolicy(121, 10, 80); Assert.assertFalse(policy.checkErrorRate(buckets)); policy = new SimpleErrorCheckPolicy(130, 10, 20); Assert.assertTrue(policy.checkErrorRate(buckets)); } private List<Bucket> getBuckets(Integer... values) { List<Bucket> buckets = new ArrayList<Bucket>(); for (Integer i : values) { Bucket b = new Bucket(); b.track(i); buckets.add(b); } return buckets; } @Test public void testNoErrorCheckTriggers() throws Exception { final ErrorRateMonitor errorMonitor = new ErrorRateMonitor(20, 1, 10); errorMonitor.addPolicy(new SimpleErrorCheckPolicy(130, 8, 80)); // 80% of 10 seconds, if error rate > 120 then alert errorMonitor.addPolicy(new SimpleErrorCheckPolicy(200, 4, 80)); // 80% of 5 seconds, if error rate > 200 then alert List<Integer> rates = CollectionUtils.newArrayList(90, 120, 180); int errorCount = runTest(9, errorMonitor, rates); Assert.assertEquals(0, errorCount); } @Test public void testSustainedErrorTriggers() throws Exception { final ErrorRateMonitor errorMonitor = new ErrorRateMonitor(20, 1, 10); errorMonitor.addPolicy(new SimpleErrorCheckPolicy(130, 8, 80)); // 80% of 10 seconds, if error rate > 120 then alert errorMonitor.addPolicy(new SimpleErrorCheckPolicy(200, 4, 80)); // 80% of 5 seconds, if error rate > 200 then alert List<Integer> rates = CollectionUtils.newArrayList(130, 140, 180); int errorCount = runTest(9, errorMonitor, rates); Assert.assertEquals(1, errorCount); } @Test public void testOnlyLargeSpikeTriggers() throws Exception { final ErrorRateMonitor errorMonitor = new ErrorRateMonitor(20, 1, 10); errorMonitor.addPolicy(new SimpleErrorCheckPolicy(130, 10, 80)); // 80% of 10 seconds, if error rate > 120 then alert errorMonitor.addPolicy(new SimpleErrorCheckPolicy(200, 4, 80)); // 80% of 5 seconds, if error rate > 200 then alert List<Integer> rates = new ArrayList<Integer>(); rates.add(110); rates.add(250); int errorCount = runTest(10, errorMonitor, rates); Assert.assertEquals(1, errorCount); } private int runTest(int totalTestRunTimeSeconds, final ErrorRateMonitor errorMonitor, final List<Integer> rates) throws Exception { int numThreads = 5; ExecutorService threadPool = Executors.newFixedThreadPool(numThreads); final AtomicReference<RateLimitUtil> limiter = new AtomicReference<RateLimitUtil>(RateLimitUtil.create(rates.get(0))); final AtomicBoolean stop = new AtomicBoolean(false); final CyclicBarrier barrier = new CyclicBarrier(numThreads + 1); final CountDownLatch latch = new CountDownLatch(numThreads); final AtomicInteger errorCount = new AtomicInteger(0); for (int i = 0; i < numThreads; i++) { threadPool.submit(new Callable<Void>() { @Override public Void call() throws Exception { barrier.await(); while (!stop.get() && !Thread.currentThread().isInterrupted()) { if (limiter.get().acquire()) { boolean success = errorMonitor.trackErrorRate(1); if (!success) { errorCount.incrementAndGet(); } } } latch.countDown(); return null; } }); } barrier.await(); int numIterations = rates.size(); int sleepPerIteration = totalTestRunTimeSeconds / numIterations; int round = 1; do { Thread.sleep(sleepPerIteration * 1000); if (round < rates.size()) { System.out.println("Changing rate to " + rates.get(round)); limiter.set(RateLimitUtil.create(rates.get(round))); } round++; } while (round <= numIterations); stop.set(true); latch.await(); threadPool.shutdownNow(); List<Bucket> buckets = errorMonitor.getRateTracker().getAllBuckets(); for (Bucket b : buckets) { System.out.print(" " + b.count()); } System.out.println("\n=========TEST DONE=============="); return errorCount.get(); } }
5,985
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/health/ConnectionPoolHealthTrackerTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.health; import static org.mockito.Matchers.any; import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.atomic.AtomicBoolean; import com.netflix.dyno.connectionpool.HostBuilder; import org.apache.log4j.BasicConfigurator; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import com.netflix.dyno.connectionpool.ConnectionPoolConfiguration; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.HostConnectionPool; import com.netflix.dyno.connectionpool.Host.Status; import com.netflix.dyno.connectionpool.exception.DynoException; import com.netflix.dyno.connectionpool.exception.FatalConnectionException; import com.netflix.dyno.connectionpool.impl.ConnectionPoolConfigurationImpl; public class ConnectionPoolHealthTrackerTest { private static ScheduledExecutorService threadPool; @BeforeClass public static void beforeClass() { BasicConfigurator.configure(); threadPool = Executors.newScheduledThreadPool(1); } @AfterClass public static void afterClass() { BasicConfigurator.resetConfiguration(); threadPool.shutdownNow(); } @Test public void testConnectionPoolRecycle() throws Exception { ConnectionPoolConfiguration config = new ConnectionPoolConfigurationImpl("test"); ConnectionPoolHealthTracker<Integer> tracker = new ConnectionPoolHealthTracker<Integer>(config, threadPool, 1000, -1); tracker.start(); Host h1 = new HostBuilder().setHostname("h1").setRack("r1").setStatus(Status.Up).createHost(); AtomicBoolean poolStatus = new AtomicBoolean(false); HostConnectionPool<Integer> hostPool = getMockConnectionPool(h1, poolStatus); FatalConnectionException e = new FatalConnectionException("fatal"); for (int i = 0; i < 10; i++) { tracker.trackConnectionError(hostPool, e); } Thread.sleep(2000); tracker.stop(); verify(hostPool, atLeastOnce()).markAsDown(any(DynoException.class)); verify(hostPool, times(1)).reconnect(); Assert.assertTrue("Pool active? : " + hostPool.isActive(), hostPool.isActive()); // Check that the reconnecting pool is no longer being tracked by the tracker Assert.assertNull(tracker.getReconnectingPools().get(h1)); } @Test public void testBadConnectionPoolKeepsReconnecting() throws Exception { ConnectionPoolConfiguration config = new ConnectionPoolConfigurationImpl("test"); ConnectionPoolHealthTracker<Integer> tracker = new ConnectionPoolHealthTracker<Integer>(config, threadPool, 1000, -1); tracker.start(); Host h1 = new HostBuilder().setHostname("h1").setRack("r1").setStatus(Status.Up).createHost(); AtomicBoolean poolStatus = new AtomicBoolean(false); HostConnectionPool<Integer> hostPool = getMockConnectionPool(h1, poolStatus, true); FatalConnectionException e = new FatalConnectionException("fatal"); for (int i = 0; i < 10; i++) { tracker.trackConnectionError(hostPool, e); } Thread.sleep(2000); tracker.stop(); verify(hostPool, atLeastOnce()).markAsDown(any(DynoException.class)); verify(hostPool, atLeastOnce()).reconnect(); Assert.assertFalse("Pool active? : " + hostPool.isActive(), hostPool.isActive()); // Check that the reconnecting pool is not still being tracked by the tracker Assert.assertNotNull(tracker.getReconnectingPools().get(h1)); } private HostConnectionPool<Integer> getMockConnectionPool(final Host host, final AtomicBoolean active) { return getMockConnectionPool(host, active, false); } private HostConnectionPool<Integer> getMockConnectionPool(final Host host, final AtomicBoolean active, final Boolean badConnectionPool) { @SuppressWarnings("unchecked") HostConnectionPool<Integer> hostPool = mock(HostConnectionPool.class); when(hostPool.getHost()).thenReturn(host); doAnswer(new Answer<Boolean>() { @Override public Boolean answer(InvocationOnMock invocation) throws Throwable { return active.get(); } }).when(hostPool).isActive(); doAnswer(new Answer<Void>() { @Override public Void answer(InvocationOnMock invocation) throws Throwable { active.set(false); return null; } }).when(hostPool).markAsDown(any(DynoException.class)); doAnswer(new Answer<Void>() { @Override public Void answer(InvocationOnMock invocation) throws Throwable { if (badConnectionPool) { throw new RuntimeException(); } else { active.set(true); return null; } } }).when(hostPool).reconnect(); return hostPool; } }
5,986
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/lb/HostTokenTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.lb; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; import com.netflix.dyno.connectionpool.HostBuilder; import org.junit.Assert; import org.junit.Test; public class HostTokenTest { @Test public void testEquals() throws Exception { HostToken t1 = new HostToken(1L, new HostBuilder().setHostname("foo").setPort(1234).setRack("foo_rack").createHost()); HostToken t2 = new HostToken(1L, new HostBuilder().setHostname("foo").setPort(1234).setRack("foo_rack").createHost()); Assert.assertEquals(t1, t2); // change token HostToken t3 = new HostToken(2L, new HostBuilder().setHostname("foo").setPort(1234).setRack("foo_rack").createHost()); Assert.assertFalse(t1.equals(t3)); // change host name HostToken t4 = new HostToken(1L, new HostBuilder().setHostname("foo1").setPort(1234).setRack("foo_rack").createHost()); Assert.assertFalse(t1.equals(t4)); } @Test public void testSort() throws Exception { HostToken t1 = new HostToken(1L, new HostBuilder().setHostname("foo1").setPort(1234).setRack("foo_rack").createHost()); HostToken t2 = new HostToken(2L, new HostBuilder().setHostname("foo2").setPort(1234).setRack("foo_rack").createHost()); HostToken t3 = new HostToken(3L, new HostBuilder().setHostname("foo3").setPort(1234).setRack("foo_rack").createHost()); HostToken t4 = new HostToken(4L, new HostBuilder().setHostname("foo4").setPort(1234).setRack("foo_rack").createHost()); HostToken t5 = new HostToken(5L, new HostBuilder().setHostname("foo5").setPort(1234).setRack("foo_rack").createHost()); HostToken[] arr = {t5, t2, t4, t3, t1}; List<HostToken> list = Arrays.asList(arr); Assert.assertEquals(t5, list.get(0)); Assert.assertEquals(t2, list.get(1)); Assert.assertEquals(t4, list.get(2)); Assert.assertEquals(t3, list.get(3)); Assert.assertEquals(t1, list.get(4)); Collections.sort(list, new Comparator<HostToken>() { @Override public int compare(HostToken o1, HostToken o2) { return o1.compareTo(o2); } }); Assert.assertEquals(t1, list.get(0)); Assert.assertEquals(t2, list.get(1)); Assert.assertEquals(t3, list.get(2)); Assert.assertEquals(t4, list.get(3)); Assert.assertEquals(t5, list.get(4)); } }
5,987
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/lb/TokenMapSupplierTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.lb; import java.util.ArrayList; import java.util.List; import com.netflix.dyno.connectionpool.HostBuilder; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.Host.Status; public class TokenMapSupplierTest { @Test public void testParseJson() throws Exception { String json = "[{\"token\":\"3051939411\",\"hostname\":\"ec2-54-237-143-4.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.237.143.4\",\"zone\":\"us-east-1d\",\"location\":\"us-east-1\"}\"," + "\"{\"token\":\"188627880\",\"hostname\":\"ec2-50-17-65-2.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"50.17.65.2\",\"zone\":\"us-east-1d\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"2019187467\",\"hostname\":\"ec2-54-83-87-174.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.83.87.174\",\"zone\":\"us-east-1c\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"3450843231\",\"hostname\":\"ec2-54-81-138-73.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.81.138.73\",\"zone\":\"us-east-1c\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"587531700\",\"hostname\":\"ec2-54-82-176-215.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.82.176.215\",\"zone\":\"us-east-1c\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"3101134286\",\"hostname\":\"ec2-54-82-83-115.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.82.83.115\",\"zone\":\"us-east-1e\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"237822755\",\"hostname\":\"ec2-54-211-220-55.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.211.220.55\",\"zone\":\"us-east-1e\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"1669478519\",\"hostname\":\"ec2-54-80-65-203.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.80.65.203\",\"zone\":\"us-east-1e\",\"location\":\"us-east-1\"}]\""; List<Host> hostList = new ArrayList<Host>(); hostList.add(new HostBuilder().setHostname("ec2-54-237-143-4.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1d").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-50-17-65-2.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1d").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-83-87-174.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1c").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-81-138-73.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1c").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-82-176-215.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1c").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-82-83-115.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1e").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-211-220-55.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1e").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-80-65-203.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1e").setStatus(Status.Up).createHost()); HttpEndpointBasedTokenMapSupplier tokenSupplier = new HttpEndpointBasedTokenMapSupplier("us-east-1d", 11211); List<HostToken> hTokens = tokenSupplier.parseTokenListFromJson(json); Assert.assertTrue(hTokens.get(0).getToken().equals(3051939411L)); Assert.assertTrue(hTokens.get(0).getHost().getHostName().equals("ec2-54-237-143-4.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(1).getToken().equals(188627880L)); Assert.assertTrue(hTokens.get(1).getHost().getHostName().equals("ec2-50-17-65-2.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(2).getToken().equals(2019187467L)); Assert.assertTrue(hTokens.get(2).getHost().getHostName().equals("ec2-54-83-87-174.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(3).getToken().equals(3450843231L)); Assert.assertTrue(hTokens.get(3).getHost().getHostName().equals("ec2-54-81-138-73.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(4).getToken().equals(587531700L)); Assert.assertTrue(hTokens.get(4).getHost().getHostName().equals("ec2-54-82-176-215.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(5).getToken().equals(3101134286L)); Assert.assertTrue(hTokens.get(5).getHost().getHostName().equals("ec2-54-82-83-115.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(6).getToken().equals(237822755L)); Assert.assertTrue(hTokens.get(6).getHost().getHostName().equals("ec2-54-211-220-55.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(7).getToken().equals(1669478519L)); Assert.assertTrue(hTokens.get(7).getHost().getHostName().equals("ec2-54-80-65-203.compute-1.amazonaws.com")); } @Test public void testParseJsonWithPorts() throws Exception { String json = "[{\"token\":\"3051939411\",\"hostname\":\"ec2-54-237-143-4.compute-1.amazonaws.com\",\"port\":\"11211\",\"dc\":\"us-east-1\",\"ip\":\"54.237.143.4\",\"zone\":\"us-east-1d\",\"location\":\"us-east-1\"}\"," + "\"{\"token\":\"188627880\",\"hostname\":\"ec2-54-237-143-4.compute-1.amazonaws.com\",\"port\":\"11212\",\"dc\":\"us-east-1\",\"ip\":\"50.17.65.2\",\"zone\":\"us-east-1d\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"2019187467\",\"hostname\":\"ec2-54-237-143-4.compute-1.amazonaws.com\",\"port\":\"11213\",\"dc\":\"us-east-1\",\"ip\":\"54.83.87.174\",\"zone\":\"us-east-1c\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"3450843231\",\"hostname\":\"ec2-54-237-143-4.compute-1.amazonaws.com\",\"port\":\"11214\",\"dc\":\"us-east-1\",\"ip\":\"54.81.138.73\",\"zone\":\"us-east-1c\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"587531700\",\"hostname\":\"ec2-54-82-176-215.compute-1.amazonaws.com\",\"port\":\"11215\",\"dc\":\"us-east-1\",\"ip\":\"54.82.176.215\",\"zone\":\"us-east-1c\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"3101134286\",\"hostname\":\"ec2-54-82-83-115.compute-1.amazonaws.com\",\"port\":\"11216\",\"dc\":\"us-east-1\",\"ip\":\"54.82.83.115\",\"zone\":\"us-east-1e\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"237822755\",\"hostname\":\"ec2-54-211-220-55.compute-1.amazonaws.com\",\"port\":\"11217\",\"dc\":\"us-east-1\",\"ip\":\"54.211.220.55\",\"zone\":\"us-east-1e\",\"location\":\"us-east-1\"},\"" + "\"{\"token\":\"1669478519\",\"hostname\":\"ec2-54-80-65-203.compute-1.amazonaws.com\",\"port\":\"11218\",\"dc\":\"us-east-1\",\"ip\":\"54.80.65.203\",\"zone\":\"us-east-1e\",\"location\":\"us-east-1\"}]\""; List<Host> hostList = new ArrayList<Host>(); hostList.add(new HostBuilder().setHostname("ec2-54-237-143-4.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1d").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-237-143-4.compute-1.amazonaws.com").setPort(11212).setRack("us-east-1d").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-237-143-4.compute-1.amazonaws.com").setPort(11213).setRack("us-east-1c").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-237-143-4.compute-1.amazonaws.com").setPort(11214).setRack("us-east-1c").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-82-176-215.compute-1.amazonaws.com").setPort(11215).setRack("us-east-1c").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-82-83-115.compute-1.amazonaws.com").setPort(11216).setRack("us-east-1e").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-211-220-55.compute-1.amazonaws.com").setPort(11217).setRack("us-east-1e").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-80-65-203.compute-1.amazonaws.com").setPort(11218).setRack("us-east-1e").setStatus(Status.Up).createHost()); HttpEndpointBasedTokenMapSupplier tokenSupplier = new HttpEndpointBasedTokenMapSupplier("us-east-1d", 11211); List<HostToken> hTokens = tokenSupplier.parseTokenListFromJson(json); Assert.assertTrue(hTokens.get(0).getToken().equals(3051939411L)); Assert.assertTrue(hTokens.get(0).getHost().getHostName().equals("ec2-54-237-143-4.compute-1.amazonaws.com")); Assert.assertEquals(hTokens.get(0).getHost().getPort(), 11211); Assert.assertTrue(hTokens.get(1).getToken().equals(188627880L)); Assert.assertTrue(hTokens.get(1).getHost().getHostName().equals("ec2-54-237-143-4.compute-1.amazonaws.com")); Assert.assertEquals(hTokens.get(1).getHost().getPort(), 11212); Assert.assertTrue(hTokens.get(2).getToken().equals(2019187467L)); Assert.assertTrue(hTokens.get(2).getHost().getHostName().equals("ec2-54-237-143-4.compute-1.amazonaws.com")); Assert.assertEquals(hTokens.get(2).getHost().getPort(), 11213); Assert.assertTrue(hTokens.get(3).getToken().equals(3450843231L)); Assert.assertTrue(hTokens.get(3).getHost().getHostName().equals("ec2-54-237-143-4.compute-1.amazonaws.com")); Assert.assertEquals(hTokens.get(3).getHost().getPort(), 11214); Assert.assertTrue(hTokens.get(4).getToken().equals(587531700L)); Assert.assertTrue(hTokens.get(4).getHost().getHostName().equals("ec2-54-82-176-215.compute-1.amazonaws.com")); Assert.assertEquals(hTokens.get(4).getHost().getPort(), 11215); Assert.assertTrue(hTokens.get(5).getToken().equals(3101134286L)); Assert.assertTrue(hTokens.get(5).getHost().getHostName().equals("ec2-54-82-83-115.compute-1.amazonaws.com")); Assert.assertEquals(hTokens.get(5).getHost().getPort(), 11216); Assert.assertTrue(hTokens.get(6).getToken().equals(237822755L)); Assert.assertTrue(hTokens.get(6).getHost().getHostName().equals("ec2-54-211-220-55.compute-1.amazonaws.com")); Assert.assertEquals(hTokens.get(6).getHost().getPort(), 11217); Assert.assertTrue(hTokens.get(7).getToken().equals(1669478519L)); Assert.assertTrue(hTokens.get(7).getHost().getHostName().equals("ec2-54-80-65-203.compute-1.amazonaws.com")); Assert.assertEquals(hTokens.get(7).getHost().getPort(), 11218); } @Test public void testParseJsonWithHastags() throws Exception { String json = "[{\"token\":\"3051939411\",\"hostname\":\"ec2-54-237-143-4.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.237.143.4\",\"zone\":\"us-east-1d\",\"location\":\"us-east-1\",\"hashtag\":\"{}\"}\"," + "\"{\"token\":\"188627880\",\"hostname\":\"ec2-50-17-65-2.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"50.17.65.2\",\"zone\":\"us-east-1d\",\"location\":\"us-east-1\",\"hashtag\":\"{}\"},\"" + "\"{\"token\":\"2019187467\",\"hostname\":\"ec2-54-83-87-174.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.83.87.174\",\"zone\":\"us-east-1c\",\"location\":\"us-east-1\",\"hashtag\":\"{}\"},\"" + "\"{\"token\":\"3450843231\",\"hostname\":\"ec2-54-81-138-73.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.81.138.73\",\"zone\":\"us-east-1c\",\"location\":\"us-east-1\",\"hashtag\":\"{}\"},\"" + "\"{\"token\":\"587531700\",\"hostname\":\"ec2-54-82-176-215.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.82.176.215\",\"zone\":\"us-east-1c\",\"location\":\"us-east-1\",\"hashtag\":\"{}\"},\"" + "\"{\"token\":\"3101134286\",\"hostname\":\"ec2-54-82-83-115.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.82.83.115\",\"zone\":\"us-east-1e\",\"location\":\"us-east-1\",\"hashtag\":\"{}\"},\"" + "\"{\"token\":\"237822755\",\"hostname\":\"ec2-54-211-220-55.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.211.220.55\",\"zone\":\"us-east-1e\",\"location\":\"us-east-1\",\"hashtag\":\"{}\"},\"" + "\"{\"token\":\"1669478519\",\"hostname\":\"ec2-54-80-65-203.compute-1.amazonaws.com\",\"dc\":\"us-east-1\",\"ip\":\"54.80.65.203\",\"zone\":\"us-east-1e\",\"location\":\"us-east-1\",\"hashtag\":\"{}\"}]\""; List<Host> hostList = new ArrayList<Host>(); hostList.add(new HostBuilder().setHostname("ec2-54-237-143-4.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1d").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-50-17-65-2.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1d").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-83-87-174.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1c").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-81-138-73.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1c").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-82-176-215.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1c").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-82-83-115.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1e").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-211-220-55.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1e").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-80-65-203.compute-1.amazonaws.com").setPort(11211).setRack("us-east-1e").setStatus(Status.Up).createHost()); HttpEndpointBasedTokenMapSupplier tokenSupplier = new HttpEndpointBasedTokenMapSupplier("us-east-1d", 11211); List<HostToken> hTokens = tokenSupplier.parseTokenListFromJson(json); Assert.assertTrue(hTokens.get(0).getToken().equals(3051939411L)); Assert.assertTrue(hTokens.get(0).getHost().getHostName().equals("ec2-54-237-143-4.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(1).getToken().equals(188627880L)); Assert.assertTrue(hTokens.get(1).getHost().getHostName().equals("ec2-50-17-65-2.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(2).getToken().equals(2019187467L)); Assert.assertTrue(hTokens.get(2).getHost().getHostName().equals("ec2-54-83-87-174.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(3).getToken().equals(3450843231L)); Assert.assertTrue(hTokens.get(3).getHost().getHostName().equals("ec2-54-81-138-73.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(4).getToken().equals(587531700L)); Assert.assertTrue(hTokens.get(4).getHost().getHostName().equals("ec2-54-82-176-215.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(5).getToken().equals(3101134286L)); Assert.assertTrue(hTokens.get(5).getHost().getHostName().equals("ec2-54-82-83-115.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(6).getToken().equals(237822755L)); Assert.assertTrue(hTokens.get(6).getHost().getHostName().equals("ec2-54-211-220-55.compute-1.amazonaws.com")); Assert.assertTrue(hTokens.get(7).getToken().equals(1669478519L)); Assert.assertTrue(hTokens.get(7).getHost().getHostName().equals("ec2-54-80-65-203.compute-1.amazonaws.com")); } }
5,988
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/lb/CircularListTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.lb; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.commons.math.stat.descriptive.SummaryStatistics; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import com.netflix.dyno.connectionpool.impl.lb.CircularList; import com.netflix.dyno.connectionpool.impl.utils.CollectionUtils; import com.netflix.dyno.connectionpool.impl.utils.CollectionUtils.Predicate; public class CircularListTest { private static final List<Integer> iList = new ArrayList<Integer>(); private static final CircularList<Integer> cList = new CircularList<Integer>(iList); private static final Integer size = 10; private static ExecutorService threadPool; @BeforeClass public static void beforeClass() { threadPool = Executors.newFixedThreadPool(5); } @Before public void beforeTest() { iList.clear(); for (int i = 0; i < size; i++) { iList.add(i); } cList.swapWithList(iList); } @AfterClass public static void afterClass() { threadPool.shutdownNow(); } @Test public void testSingleThread() throws Exception { TestWorker worker = new TestWorker(); for (int i = 0; i < 100; i++) { worker.process(); } System.out.println(worker.map); for (Integer key : worker.map.keySet()) { Assert.assertTrue(worker.map.toString(), 10 == worker.map.get(key)); } } @Test public void testSingleThreadWithElementAdd() throws Exception { final AtomicBoolean stop = new AtomicBoolean(false); Future<Map<Integer, Integer>> future = threadPool.submit(new Callable<Map<Integer, Integer>>() { @Override public Map<Integer, Integer> call() throws Exception { TestWorker worker = new TestWorker(); while (!stop.get()) { worker.process(); } return worker.map; } }); Thread.sleep(500); List<Integer> newList = new ArrayList<Integer>(); newList.addAll(iList); for (int i = 10; i < 15; i++) { newList.add(i); } cList.swapWithList(newList); Thread.sleep(100); stop.set(true); Map<Integer, Integer> result = future.get(); Map<Integer, Integer> subMap = CollectionUtils.filterKeys(result, new Predicate<Integer>() { @Override public boolean apply(Integer input) { return input != null && input < 10; } }); List<Integer> list = new ArrayList<Integer>(subMap.values()); checkValues(list); subMap = CollectionUtils.difference(result, subMap).entriesOnlyOnLeft(); list = new ArrayList<Integer>(subMap.values()); checkValues(list); } @Test public void testSingleThreadWithElementRemove() throws Exception { final AtomicBoolean stop = new AtomicBoolean(false); Future<Map<Integer, Integer>> future = threadPool.submit(new Callable<Map<Integer, Integer>>() { @Override public Map<Integer, Integer> call() throws Exception { TestWorker worker = new TestWorker(); while (!stop.get()) { worker.process(); } return worker.map; } }); Thread.sleep(200); List<Integer> newList = new ArrayList<Integer>(); newList.addAll(iList); final List<Integer> removedElements = new ArrayList<Integer>(); removedElements.add(newList.remove(2)); removedElements.add(newList.remove(5)); removedElements.add(newList.remove(6)); cList.swapWithList(newList); Thread.sleep(200); stop.set(true); Map<Integer, Integer> result = future.get(); Map<Integer, Integer> subMap = CollectionUtils.filterKeys(result, new Predicate<Integer>() { @Override public boolean apply(Integer input) { return !removedElements.contains(input); } }); checkValues(new ArrayList<Integer>(subMap.values())); } @Test public void testMultipleThreads() throws Exception { final AtomicBoolean stop = new AtomicBoolean(false); final CyclicBarrier barrier = new CyclicBarrier(5); final List<Future<Map<Integer, Integer>>> futures = new ArrayList<Future<Map<Integer, Integer>>>(); for (int i = 0; i < 5; i++) { futures.add(threadPool.submit(new Callable<Map<Integer, Integer>>() { @Override public Map<Integer, Integer> call() throws Exception { barrier.await(); TestWorker worker = new TestWorker(); while (!stop.get()) { worker.process(); } return worker.map; } })); } Thread.sleep(200); stop.set(true); Map<Integer, Integer> totalMap = getTotalMap(futures); checkValues(new ArrayList<Integer>(totalMap.values())); } @Test public void testMultipleThreadsWithElementAdd() throws Exception { final AtomicBoolean stop = new AtomicBoolean(false); final CyclicBarrier barrier = new CyclicBarrier(5); final List<Future<Map<Integer, Integer>>> futures = new ArrayList<Future<Map<Integer, Integer>>>(); for (int i = 0; i < 5; i++) { futures.add(threadPool.submit(new Callable<Map<Integer, Integer>>() { @Override public Map<Integer, Integer> call() throws Exception { barrier.await(); TestWorker worker = new TestWorker(); while (!stop.get()) { worker.process(); } return worker.map; } })); } Thread.sleep(200); List<Integer> newList = new ArrayList<Integer>(iList); for (int i = 10; i < 15; i++) { newList.add(i); } cList.swapWithList(newList); Thread.sleep(200); stop.set(true); Map<Integer, Integer> result = getTotalMap(futures); Map<Integer, Integer> subMap = CollectionUtils.filterKeys(result, new Predicate<Integer>() { @Override public boolean apply(Integer input) { return input < 10; } }); checkValues(new ArrayList<Integer>(subMap.values())); subMap = CollectionUtils.difference(result, subMap).entriesOnlyOnLeft(); checkValues(new ArrayList<Integer>(subMap.values())); } @Test public void testMultipleThreadsWithElementsRemoved() throws Exception { final AtomicBoolean stop = new AtomicBoolean(false); final CyclicBarrier barrier = new CyclicBarrier(5); final List<Future<Map<Integer, Integer>>> futures = new ArrayList<Future<Map<Integer, Integer>>>(); for (int i = 0; i < 5; i++) { futures.add(threadPool.submit(new Callable<Map<Integer, Integer>>() { @Override public Map<Integer, Integer> call() throws Exception { barrier.await(); TestWorker worker = new TestWorker(); while (!stop.get()) { worker.process(); } return worker.map; } })); } Thread.sleep(200); List<Integer> newList = new ArrayList<Integer>(iList); final List<Integer> removedElements = new ArrayList<Integer>(); removedElements.add(newList.remove(2)); removedElements.add(newList.remove(5)); removedElements.add(newList.remove(6)); cList.swapWithList(newList); Thread.sleep(200); stop.set(true); Map<Integer, Integer> result = getTotalMap(futures); Map<Integer, Integer> subMap = CollectionUtils.filterKeys(result, new Predicate<Integer>() { @Override public boolean apply(Integer x) { return !removedElements.contains(x); } }); checkValues(new ArrayList<Integer>(subMap.values())); } @Test public void testCircularListGet() { // integer overflow on read index should not result in exception for (long i = 0; i < (long) Integer.MAX_VALUE + 10; i++) { cList.getNextElement(); } } private class TestWorker { private final ConcurrentHashMap<Integer, Integer> map = new ConcurrentHashMap<Integer, Integer>(); private void process() { Integer element = cList.getNextElement(); Integer count = map.get(element); if (count == null) { map.put(element, 1); } else { map.put(element, count + 1); } } } private static Map<Integer, Integer> getTotalMap(List<Future<Map<Integer, Integer>>> futures) throws InterruptedException, ExecutionException { Map<Integer, Integer> totalMap = new HashMap<Integer, Integer>(); for (Future<Map<Integer, Integer>> f : futures) { Map<Integer, Integer> map = f.get(); for (Integer element : map.keySet()) { Integer count = totalMap.get(element); if (count == null) { totalMap.put(element, map.get(element)); } else { totalMap.put(element, map.get(element) + count); } } } return totalMap; } private static double checkValues(List<Integer> values) { System.out.println("Values: " + values); SummaryStatistics ss = new SummaryStatistics(); for (int i = 0; i < values.size(); i++) { ss.addValue(values.get(i)); } double mean = ss.getMean(); double stddev = ss.getStandardDeviation(); double p = ((stddev * 100) / mean); System.out.println("Percentage diff: " + p); Assert.assertTrue("" + p + " " + values, p < 0.1); return p; } }
5,989
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/lb/AbstractTokenMapSupplierTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.lb; import java.util.*; import com.netflix.dyno.connectionpool.HostBuilder; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.TokenMapSupplier; import com.netflix.dyno.connectionpool.Host.Status; public class AbstractTokenMapSupplierTest { final String json = "[{\"token\":\"3051939411\",\"hostname\":\"ec2-54-237-143-4.compute-1.amazonaws.com\",\"port\":\"11211\",\"dc\":\"us-east-1\",\"ip\":\"54.237.143.4\",\"zone\":\"us-east-1d\"}\"," + "\"{\"token\":\"188627880\",\"hostname\":\"ec2-50-17-65-2.compute-1.amazonaws.com\",\"port\":\"11211\",\"dc\":\"us-east-1\",\"ip\":\"50.17.65.2\",\"zone\":\"us-east-1d\"},\"" + "\"{\"token\":\"2019187467\",\"hostname\":\"ec2-54-83-87-174.compute-1.amazonaws.com\",\"port\":\"11211\",\"dc\":\"us-east-1\",\"ip\":\"54.83.87.174\",\"zone\":\"us-east-1c\" },\"" + "\"{\"token\":\"3450843231\",\"hostname\":\"ec2-54-81-138-73.compute-1.amazonaws.com\",\"port\":\"11211\",\"dc\":\"us-east-1\",\"ip\":\"54.81.138.73\",\"zone\":\"us-east-1c\"},\"" + "\"{\"token\":\"587531700\",\"hostname\":\"ec2-54-82-176-215.compute-1.amazonaws.com\",\"port\":\"11211\",\"dc\":\"us-east-1\",\"ip\":\"54.82.176.215\",\"zone\":\"us-east-1c\"},\"" + "\"{\"token\":\"3101134286\",\"hostname\":\"ec2-54-82-83-115.compute-1.amazonaws.com\",\"port\":\"11211\",\"dc\":\"us-east-1\",\"ip\":\"54.82.83.115\",\"zone\":\"us-east-1e\"},\"" + "\"{\"token\":\"237822755\",\"hostname\":\"ec2-54-211-220-55.compute-1.amazonaws.com\",\"port\":\"11211\",\"dc\":\"us-east-1\",\"ip\":\"54.211.220.55\",\"zone\":\"us-east-1e\"},\"" + "\"{\"token\":\"1669478519\",\"hostname\":\"ec2-54-80-65-203.compute-1.amazonaws.com\",\"port\":\"11211\",\"dc\":\"us-east-1\",\"ip\":\"54.80.65.203\",\"zone\":\"us-east-1e\"}]\""; private TokenMapSupplier testTokenMapSupplier = new AbstractTokenMapSupplier() { @Override public String getTopologyJsonPayload(Set<Host> activeHosts) { return json; } @Override public String getTopologyJsonPayload(String hostname) { return json; } }; @Test public void testParseJson() throws Exception { List<Host> hostList = new ArrayList<>(); hostList.add(new HostBuilder().setHostname("ec2-54-237-143-4.compute-1.amazonaws.com").setRack("rack").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-50-17-65-2.compute-1.amazonaws.com").setRack("rack").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-83-87-174.compute-1.amazonaws.com").setRack("rack").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-81-138-73.compute-1.amazonaws.com").setRack("rack").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-82-176-215.compute-1.amazonaws.com").setRack("rack").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-82-83-115.compute-1.amazonaws.com").setRack("rack").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-211-220-55.compute-1.amazonaws.com").setRack("rack").setStatus(Status.Up).createHost()); hostList.add(new HostBuilder().setHostname("ec2-54-80-65-203.compute-1.amazonaws.com").setRack("rack").setStatus(Status.Up).createHost()); List<HostToken> hTokens = testTokenMapSupplier.getTokens(new HashSet<>(hostList)); Collections.sort(hTokens, new Comparator<HostToken>() { @Override public int compare(HostToken o1, HostToken o2) { return o1.getToken().compareTo(o2.getToken()); } }); Assert.assertTrue(validateHostToken(hTokens.get(0), 188627880L, "ec2-50-17-65-2.compute-1.amazonaws.com", "50.17.65.2", 11211, "us-east-1d", "us-east-1")); Assert.assertTrue(validateHostToken(hTokens.get(1), 237822755L, "ec2-54-211-220-55.compute-1.amazonaws.com", "54.211.220.55", 11211, "us-east-1e", "us-east-1")); Assert.assertTrue(validateHostToken(hTokens.get(2), 587531700L, "ec2-54-82-176-215.compute-1.amazonaws.com", "54.82.176.215", 11211, "us-east-1c", "us-east-1")); Assert.assertTrue(validateHostToken(hTokens.get(3), 1669478519L, "ec2-54-80-65-203.compute-1.amazonaws.com", "54.80.65.203", 11211, "us-east-1e", "us-east-1")); Assert.assertTrue(validateHostToken(hTokens.get(4), 2019187467L, "ec2-54-83-87-174.compute-1.amazonaws.com", "54.83.87.174", 11211, "us-east-1c", "us-east-1")); Assert.assertTrue(validateHostToken(hTokens.get(5), 3051939411L, "ec2-54-237-143-4.compute-1.amazonaws.com", "54.237.143.4", 11211, "us-east-1d", "us-east-1")); Assert.assertTrue(validateHostToken(hTokens.get(6), 3101134286L, "ec2-54-82-83-115.compute-1.amazonaws.com", "54.82.83.115", 11211, "us-east-1e", "us-east-1")); Assert.assertTrue(validateHostToken(hTokens.get(7), 3450843231L, "ec2-54-81-138-73.compute-1.amazonaws.com", "54.81.138.73", 11211, "us-east-1c", "us-east-1")); } private boolean validateHostToken(HostToken hostToken, Long token, String hostname, String ipAddress, int port, String rack, String datacenter) { return Objects.equals(hostToken.getToken(), token) && hostToken.getHost().getHostName().equals(hostname) && hostToken.getHost().getHostAddress().equals(ipAddress) && hostToken.getHost().getPort() == port && hostToken.getHost().getRack().equals(rack) && hostToken.getHost().getDatacenter().equals(datacenter); } }
5,990
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/lb/HostSelectionWithFallbackTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.lb; import com.netflix.dyno.connectionpool.BaseOperation; import com.netflix.dyno.connectionpool.Connection; import com.netflix.dyno.connectionpool.ConnectionPoolConfiguration.LoadBalancingStrategy; import com.netflix.dyno.connectionpool.ConnectionPoolMonitor; import com.netflix.dyno.connectionpool.HashPartitioner; import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.Host.Status; import com.netflix.dyno.connectionpool.HostBuilder; import com.netflix.dyno.connectionpool.HostConnectionPool; import com.netflix.dyno.connectionpool.RetryPolicy; import com.netflix.dyno.connectionpool.TokenMapSupplier; import com.netflix.dyno.connectionpool.impl.ConnectionPoolConfigurationImpl; import com.netflix.dyno.connectionpool.impl.CountingConnectionPoolMonitor; import com.netflix.dyno.connectionpool.impl.RetryNTimes; import com.netflix.dyno.connectionpool.impl.utils.CollectionUtils; import com.netflix.dyno.connectionpool.impl.utils.CollectionUtils.Transform; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; public class HostSelectionWithFallbackTest { private Map<Host, AtomicBoolean> poolStatus = new HashMap<Host, AtomicBoolean>(); private BaseOperation<Integer, Integer> testOperation = new BaseOperation<Integer, Integer>() { @Override public String getName() { return "test"; } @Override public String getStringKey() { return "11"; } @Override public byte[] getBinaryKey() { return null; } }; private final ConnectionPoolConfigurationImpl cpConfig = new ConnectionPoolConfigurationImpl("test"); private final ConnectionPoolMonitor cpMonitor = new CountingConnectionPoolMonitor(); String dc = "us-east-1"; String rack1 = "us-east-1c"; String rack2 = "us-east-1d"; String rack3 = "us-east-1e"; Host h1 = new HostBuilder().setHostname("h1").setRack(rack1).setStatus(Status.Up).createHost(); Host h2 = new HostBuilder().setHostname("h2").setRack(rack1).setStatus(Status.Up).createHost(); Host h3 = new HostBuilder().setHostname("h3").setRack("remoteRack1").setStatus(Status.Up).createHost(); Host h4 = new HostBuilder().setHostname("h4").setRack("remoteRack1").setStatus(Status.Up).createHost(); Host h5 = new HostBuilder().setHostname("h5").setRack("remoteRack2").setStatus(Status.Up).createHost(); Host h6 = new HostBuilder().setHostname("h6").setRack("remoteRack2").setStatus(Status.Up).createHost(); Host[] arr = {h1, h2, h3, h4, h5, h6}; List<Host> hosts = Arrays.asList(arr); @Before public void beforeTest() { cpConfig.setLocalRack(rack1); cpConfig.setLocalDataCenter(dc); cpConfig.setLoadBalancingStrategy(LoadBalancingStrategy.RoundRobin); cpConfig.withTokenSupplier(getTokenMapSupplier()); } @Test public void testFallbackToRemotePoolWhenPoolInactive() throws Exception { HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); Map<Host, HostConnectionPool<Integer>> pools = new HashMap<Host, HostConnectionPool<Integer>>(); for (Host host : hosts) { poolStatus.put(host, new AtomicBoolean(true)); pools.put(host, getMockHostConnectionPool(host, poolStatus.get(host))); } selection.initWithHosts(pools); Set<String> hostnames = new HashSet<String>(); for (int i = 0; i < 10; i++) { Connection<Integer> conn = selection.getConnection(testOperation, 1, TimeUnit.MILLISECONDS); hostnames.add(conn.getHost().getHostAddress()); } verifyExactly(hostnames, "h1", "h2"); // Now mark h1 and h2 both as "DOWN" poolStatus.get(h1).set(false); poolStatus.get(h2).set(false); hostnames.clear(); for (int i = 0; i < 10; i++) { Connection<Integer> conn = selection.getConnection(testOperation, 1, TimeUnit.MILLISECONDS); hostnames.add(conn.getHost().getHostAddress()); } verifyExactly(hostnames, "h3", "h4", "h5", "h6"); // Now bring h1 back up poolStatus.get(h1).set(true); hostnames.clear(); for (int i = 0; i < 10; i++) { Connection<Integer> conn = selection.getConnection(testOperation, 1, TimeUnit.MILLISECONDS); hostnames.add(conn.getHost().getHostAddress()); } verifyExactly(hostnames, "h1"); // Now bring h2 back up poolStatus.get(h2).set(true); hostnames.clear(); for (int i = 0; i < 10; i++) { Connection<Integer> conn = selection.getConnection(testOperation, 1, TimeUnit.MILLISECONDS); hostnames.add(conn.getHost().getHostAddress()); } verifyExactly(hostnames, "h1", "h2"); } @Test public void testFallbackToRemotePoolWhenHostDown() throws Exception { HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); Map<Host, HostConnectionPool<Integer>> pools = new HashMap<Host, HostConnectionPool<Integer>>(); for (Host host : hosts) { poolStatus.put(host, new AtomicBoolean(true)); pools.put(host, getMockHostConnectionPool(host, poolStatus.get(host))); } selection.initWithHosts(pools); Set<String> hostnames = new HashSet<String>(); for (int i = 0; i < 10; i++) { Connection<Integer> conn = selection.getConnection(testOperation, 1, TimeUnit.MILLISECONDS); hostnames.add(conn.getHost().getHostAddress()); } verifyExactly(hostnames, "h1", "h2"); // Now mark h1 and h2 both as "DOWN" h1.setStatus(Status.Down); h2.setStatus(Status.Down); hostnames.clear(); for (int i = 0; i < 10; i++) { Connection<Integer> conn = selection.getConnection(testOperation, 1, TimeUnit.MILLISECONDS); hostnames.add(conn.getHost().getHostAddress()); } verifyExactly(hostnames, "h3", "h4", "h5", "h6"); // Now bring h1 back up h1.setStatus(Status.Up); hostnames.clear(); for (int i = 0; i < 10; i++) { Connection<Integer> conn = selection.getConnection(testOperation, 1, TimeUnit.MILLISECONDS); hostnames.add(conn.getHost().getHostAddress()); } System.out.println(" " + hostnames); verifyExactly(hostnames, "h1"); // Now bring h2 back up h2.setStatus(Status.Up); hostnames.clear(); for (int i = 0; i < 10; i++) { Connection<Integer> conn = selection.getConnection(testOperation, 1, TimeUnit.MILLISECONDS); hostnames.add(conn.getHost().getHostAddress()); } verifyExactly(hostnames, "h1", "h2"); // Verify that failover metric has increased Assert.assertTrue(cpMonitor.getFailoverCount() > 0); } @Test public void testCrossRackFallback() throws Exception { HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); RetryPolicy retry = new RetryNTimes(3, true); Map<Host, HostConnectionPool<Integer>> pools = new HashMap<Host, HostConnectionPool<Integer>>(); for (Host host : hosts) { poolStatus.put(host, new AtomicBoolean(true)); pools.put(host, getMockHostConnectionPool(host, poolStatus.get(host))); } selection.initWithHosts(pools); Set<String> hostnames = new HashSet<String>(); for (int i = 0; i < 10; i++) { Connection<Integer> conn = selection.getConnectionUsingRetryPolicy(testOperation, 1, TimeUnit.MILLISECONDS, retry); hostnames.add(conn.getHost().getHostAddress()); } verifyExactly(hostnames, "h1", "h2"); // Record a failure so that retry attempt is not 0 and get another connection retry.failure(new Exception("Unit Test Retry Exception")); Connection<Integer> conn = selection.getConnectionUsingRetryPolicy(testOperation, 1, TimeUnit.MILLISECONDS, retry); String fallbackHost = conn.getHost().getHostAddress(); Assert.assertTrue(!fallbackHost.equals("h1") && !fallbackHost.equals("h2")); } @Test public void testGetConnectionsFromRingNormal() throws Exception { HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); Map<Host, HostConnectionPool<Integer>> pools = new HashMap<Host, HostConnectionPool<Integer>>(); for (Host host : hosts) { poolStatus.put(host, new AtomicBoolean(true)); pools.put(host, getMockHostConnectionPool(host, poolStatus.get(host))); } selection.initWithHosts(pools); Collection<String> hostnames = runConnectionsToRingTest(selection); verifyExactly(hostnames, "h1", "h2"); } @Test public void testGetConnectionsFromRingWhenPrimaryHostPoolInactive() throws Exception { HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); Map<Host, HostConnectionPool<Integer>> pools = new HashMap<Host, HostConnectionPool<Integer>>(); for (Host host : hosts) { poolStatus.put(host, new AtomicBoolean(true)); pools.put(host, getMockHostConnectionPool(host, poolStatus.get(host))); } selection.initWithHosts(pools); // Put Host H1 as DOWN poolStatus.get(h1).set(false); Collection<String> hostnames = runConnectionsToRingTest(selection); verifyPresent(hostnames, "h2"); verifyAtLeastOnePresent(hostnames, "h3", "h5"); // Put Host H2 as DOWN selection.initWithHosts(pools); poolStatus.get(h1).set(true); poolStatus.get(h2).set(false); hostnames = runConnectionsToRingTest(selection); verifyPresent(hostnames, "h1"); verifyAtLeastOnePresent(hostnames, "h4", "h6"); // Put Hosts H1 and H2 as DOWN selection.initWithHosts(pools); poolStatus.get(h1).set(false); poolStatus.get(h2).set(false); hostnames = runConnectionsToRingTest(selection); verifyAtLeastOnePresent(hostnames, "h3", "h5"); verifyAtLeastOnePresent(hostnames, "h4", "h6"); // Put Hosts H1,H2,H3 as DOWN selection.initWithHosts(pools); poolStatus.get(h1).set(false); poolStatus.get(h2).set(false); poolStatus.get(h3).set(false); hostnames = runConnectionsToRingTest(selection); verifyAtLeastOnePresent(hostnames, "h4", "h6"); verifyPresent(hostnames, "h5"); // Put Hosts H1,H2,H3,H4 as DOWN selection.initWithHosts(pools); poolStatus.get(h1).set(false); poolStatus.get(h2).set(false); poolStatus.get(h3).set(false); poolStatus.get(h4).set(false); hostnames = runConnectionsToRingTest(selection); verifyExactly(hostnames, "h5", "h6"); } @Test public void testGetConnectionsFromRingWhenHostDown() throws Exception { HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); Map<Host, HostConnectionPool<Integer>> pools = new HashMap<Host, HostConnectionPool<Integer>>(); for (Host host : hosts) { poolStatus.put(host, new AtomicBoolean(true)); pools.put(host, getMockHostConnectionPool(host, poolStatus.get(host))); } selection.initWithHosts(pools); // Put Host H1 as DOWN h1.setStatus(Status.Down); Collection<String> hostnames = runConnectionsToRingTest(selection); verifyPresent(hostnames, "h2"); verifyAtLeastOnePresent(hostnames, "h3", "h5"); // Put Host H2 as DOWN selection.initWithHosts(pools); h1.setStatus(Status.Up); h2.setStatus(Status.Down); hostnames = runConnectionsToRingTest(selection); verifyPresent(hostnames, "h1"); verifyAtLeastOnePresent(hostnames, "h4", "h6"); // Put Hosts H1 and H2 as DOWN selection.initWithHosts(pools); h1.setStatus(Status.Down); h2.setStatus(Status.Down); hostnames = runConnectionsToRingTest(selection); verifyAtLeastOnePresent(hostnames, "h3", "h5"); verifyAtLeastOnePresent(hostnames, "h4", "h6"); // Put Hosts H1,H2,H3 as DOWN selection.initWithHosts(pools); h1.setStatus(Status.Down); h2.setStatus(Status.Down); h3.setStatus(Status.Down); hostnames = runConnectionsToRingTest(selection); verifyAtLeastOnePresent(hostnames, "h4", "h6"); verifyPresent(hostnames, "h5"); // Put Hosts H1,H2,H3,H4 as DOWN selection.initWithHosts(pools); h1.setStatus(Status.Down); h2.setStatus(Status.Down); h3.setStatus(Status.Down); h4.setStatus(Status.Down); hostnames = runConnectionsToRingTest(selection); verifyExactly(hostnames, "h5", "h6"); } @Test public void testReplicationFactorOf3WithDupes() { cpConfig.setLoadBalancingStrategy(LoadBalancingStrategy.TokenAware); cpConfig.withTokenSupplier(getTokenMapSupplier()); HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); List<HostToken> hostTokens = Arrays.asList( new HostToken(1383429731L, new HostBuilder().setHostname("host-1").setPort(-1).setRack(rack1).createHost()), // Use -1 otherwise the port is opened which works new HostToken(2815085496L, new HostBuilder().setHostname("host-2").setPort(-1).setRack(rack1).createHost()), new HostToken(4246741261L, new HostBuilder().setHostname("host-3").setPort(-1).setRack(rack1).createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-4").setPort(-1).setRack(rack1).createHost()), new HostToken(2815085496L, new HostBuilder().setHostname("host-5").setPort(-1).setRack(rack1).createHost()), new HostToken(4246741261L, new HostBuilder().setHostname("host-6").setPort(-1).setRack(rack1).createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-7").setPort(-1).setRack(rack1).createHost()), new HostToken(2815085496L, new HostBuilder().setHostname("host-8").setPort(-1).setRack(rack1).createHost()), new HostToken(4246741261L, new HostBuilder().setHostname("host-9").setPort(-1).setRack(rack1).createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-7").setPort(-1).setRack(rack1).createHost()), new HostToken(2815085496L, new HostBuilder().setHostname("host-8").setPort(-1).setRack(rack1).createHost()), new HostToken(4246741261L, new HostBuilder().setHostname("host-9").setPort(-1).setRack(rack1).createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-7").setPort(-1).setRack(rack1).createHost()), new HostToken(2815085496L, new HostBuilder().setHostname("host-8").setPort(-1).setRack(rack1).createHost()), new HostToken(4246741261L, new HostBuilder().setHostname("host-9").setPort(-1).setRack(rack1).createHost()) ); int rf = selection.calculateReplicationFactor(hostTokens); Assert.assertEquals(3, rf); } @Test public void testReplicationFactorOf3() { cpConfig.setLocalRack("us-east-1c"); cpConfig.setLoadBalancingStrategy(LoadBalancingStrategy.TokenAware); cpConfig.withTokenSupplier(getTokenMapSupplier()); HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); List<HostToken> hostTokens = Arrays.asList( new HostToken(1111L, new HostBuilder().setHostname("host-1").setPort(-1).setRack(rack1).createHost()), new HostToken(1111L, new HostBuilder().setHostname("host-2").setPort(-1).setRack(rack1).createHost()), new HostToken(1111L, new HostBuilder().setHostname("host-3").setPort(-1).setRack(rack1).createHost()), new HostToken(2222L, new HostBuilder().setHostname("host-4").setPort(-1).setRack(rack1).createHost()), new HostToken(2222L, new HostBuilder().setHostname("host-5").setPort(-1).setRack(rack1).createHost()), new HostToken(2222L, new HostBuilder().setHostname("host-6").setPort(-1).setRack(rack1).createHost()) ); int rf = selection.calculateReplicationFactor(hostTokens); Assert.assertEquals(3, rf); } @Test public void testReplicationFactorOf2() { cpConfig.setLocalRack(rack1); cpConfig.setLoadBalancingStrategy(LoadBalancingStrategy.TokenAware); cpConfig.withTokenSupplier(getTokenMapSupplier()); HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); List<HostToken> hostTokens = Arrays.asList( new HostToken(1111L, new HostBuilder().setHostname("host-1").setPort(-1).setRack(rack1).createHost()), new HostToken(1111L, new HostBuilder().setHostname("host-2").setPort(-1).setRack(rack1).createHost()), new HostToken(2222L, new HostBuilder().setHostname("host-4").setPort(-1).setRack(rack1).createHost()), new HostToken(2222L, new HostBuilder().setHostname("host-5").setPort(-1).setRack(rack1).createHost()) ); int rf = selection.calculateReplicationFactor(hostTokens); Assert.assertEquals(2, rf); } @Test public void testReplicationFactorOf1() { cpConfig.setLoadBalancingStrategy(LoadBalancingStrategy.TokenAware); cpConfig.withTokenSupplier(getTokenMapSupplier()); HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); List<HostToken> hostTokens = Arrays.asList( new HostToken(1111L, h1), new HostToken(2222L, h2), new HostToken(3333L, h3), new HostToken(4444L, h4) ); int rf = selection.calculateReplicationFactor(hostTokens); Assert.assertEquals(1, rf); } @Test(expected = RuntimeException.class) public void testIllegalReplicationFactor() { cpConfig.setLocalRack("us-east-1c"); cpConfig.setLoadBalancingStrategy(LoadBalancingStrategy.TokenAware); cpConfig.withTokenSupplier(getTokenMapSupplier()); HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); List<HostToken> hostTokens = Arrays.asList( new HostToken(1111L, new HostBuilder().setHostname("host-1").setPort(-1).setRack(rack1).createHost()), new HostToken(1111L, new HostBuilder().setHostname("host-2").setPort(-1).setRack(rack1).createHost()), new HostToken(2222L, new HostBuilder().setHostname("host-4").setPort(-1).setRack(rack1).createHost()) ); selection.calculateReplicationFactor(hostTokens); } @Test public void testReplicationFactorForMultiRegionCluster() { cpConfig.setLocalRack("us-east-1d"); cpConfig.setLoadBalancingStrategy(LoadBalancingStrategy.TokenAware); cpConfig.withTokenSupplier(getTokenMapSupplier()); HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); List<HostToken> hostTokens = Arrays.asList( new HostToken(3530913378L, new HostBuilder().setHostname("host-1").setPort(-1).setRack(rack1).createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-1").setPort(-1).setRack(rack1).createHost()), new HostToken(3530913378L, new HostBuilder().setHostname("host-2").setPort(-1).setRack(rack1).createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-2").setPort(-1).setRack(rack1).createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-3").setPort(-1).setRack(rack1).createHost()), new HostToken(3530913378L, new HostBuilder().setHostname("host-3").setPort(-1).setRack(rack1).createHost()), new HostToken(3530913378L, new HostBuilder().setHostname("host-4").setPort(-1).setRack("remoteRack1").createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-4").setPort(-1).setRack("remoteRack1").createHost()), new HostToken(3530913378L, new HostBuilder().setHostname("host-5").setPort(-1).setRack("remoteRack1").createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-5").setPort(-1).setRack("remoteRack1").createHost()), new HostToken(3530913378L, new HostBuilder().setHostname("host-6").setPort(-1).setRack("remoteRack1").createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-6").setPort(-1).setRack("remoteRack1").createHost()), new HostToken(3530913378L, new HostBuilder().setHostname("host-7").setPort(-1).setRack("remoteRack2").createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-7").setPort(-1).setRack("remoteRack2").createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-8").setPort(-1).setRack("remoteRack2").createHost()), new HostToken(3530913378L, new HostBuilder().setHostname("host-8").setPort(-1).setRack("remoteRack1").createHost()), new HostToken(3530913378L, new HostBuilder().setHostname("host-9").setPort(-1).setRack("remoteRack2").createHost()), new HostToken(1383429731L, new HostBuilder().setHostname("host-9").setPort(-1).setRack("remoteRack2").createHost()) ); int rf = selection.calculateReplicationFactor(hostTokens); Assert.assertEquals(3, rf); cpConfig.setLocalRack(null); selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); rf = selection.calculateReplicationFactor(hostTokens); Assert.assertEquals(3, rf); } @Test public void testChangingHashPartitioner() { cpConfig.setLoadBalancingStrategy(LoadBalancingStrategy.TokenAware); cpConfig.withTokenSupplier(getTokenMapSupplier()); cpConfig.withHashPartitioner(getMockHashPartitioner(1000000000L)); HostSelectionWithFallback<Integer> selection = new HostSelectionWithFallback<Integer>(cpConfig, cpMonitor); Map<Host, HostConnectionPool<Integer>> pools = new HashMap<Host, HostConnectionPool<Integer>>(); for (Host host : hosts) { poolStatus.put(host, new AtomicBoolean(true)); pools.put(host, getMockHostConnectionPool(host, poolStatus.get(host))); } selection.initWithHosts(pools); Connection<Integer> connection = selection.getConnection(testOperation, 10, TimeUnit.MILLISECONDS); // Verify that h1 has been selected instead of h2 assertEquals("h1", connection.getHost().getHostAddress()); } private Collection<String> runConnectionsToRingTest(HostSelectionWithFallback<Integer> selection) { Collection<Connection<Integer>> connections = selection.getConnectionsToRing(null, 10, TimeUnit.MILLISECONDS); return CollectionUtils.transform(connections, new Transform<Connection<Integer>, String>() { @Override public String get(Connection<Integer> x) { return x.getHost().getHostAddress(); } }); } private void verifyExactly(Collection<String> resultCollection, String... hostnames) { Set<String> result = new HashSet<String>(resultCollection); Set<String> all = new HashSet<String>(); all.add("h1"); all.add("h2"); all.add("h3"); all.add("h4"); all.add("h5"); all.add("h6"); Set<String> expected = new HashSet<String>(Arrays.asList(hostnames)); Set<String> notExpected = new HashSet<String>(all); notExpected.removeAll(expected); for (String e : expected) { Assert.assertTrue("Result: " + result + ", expected: " + e, result.contains(e)); } for (String ne : notExpected) { Assert.assertFalse("Result: " + result, result.contains(ne)); } } private void verifyPresent(Collection<String> resultCollection, String... hostnames) { Set<String> result = new HashSet<String>(resultCollection); for (String h : hostnames) { Assert.assertTrue("Result: " + result + ", expected: " + h, result.contains(h)); } } private void verifyAtLeastOnePresent(Collection<String> resultCollection, String... hostnames) { Set<String> result = new HashSet<String>(resultCollection); boolean present = false; for (String h : hostnames) { if (result.contains(h)) { present = true; break; } } Assert.assertTrue("Result: " + result + ", expected at least one of: " + hostnames, present); } @SuppressWarnings("unchecked") private HostConnectionPool<Integer> getMockHostConnectionPool(final Host host, final AtomicBoolean status) { Connection<Integer> mockConnection = mock(Connection.class); when(mockConnection.getHost()).thenReturn(host); HostConnectionPool<Integer> mockPool = mock(HostConnectionPool.class); when(mockPool.isActive()).thenAnswer(new Answer<Boolean>() { @Override public Boolean answer(InvocationOnMock invocation) throws Throwable { return status.get(); } }); when(mockPool.borrowConnection(any(Integer.class), any(TimeUnit.class))).thenReturn(mockConnection); when(mockPool.getHost()).thenReturn(host); when(mockConnection.getParentConnectionPool()).thenReturn(mockPool); return mockPool; } /** cqlsh:dyno_bootstrap> select "availabilityZone","hostname","token" from tokens where "appId" = 'dynomite_redis_puneet'; availabilityZone | hostname | token ------------------+--------------------------------------------+------------ us-east-1c | ec2-54-83-179-213.compute-1.amazonaws.com | 1383429731 us-east-1c | ec2-54-224-184-99.compute-1.amazonaws.com | 309687905 us-east-1c | ec2-54-91-190-159.compute-1.amazonaws.com | 3530913377 us-east-1c | ec2-54-81-31-218.compute-1.amazonaws.com | 2457171554 us-east-1e | ec2-54-198-222-153.compute-1.amazonaws.com | 309687905 us-east-1e | ec2-54-198-239-231.compute-1.amazonaws.com | 2457171554 us-east-1e | ec2-54-226-212-40.compute-1.amazonaws.com | 1383429731 us-east-1e | ec2-54-197-178-229.compute-1.amazonaws.com | 3530913377 cqlsh:dyno_bootstrap> */ private TokenMapSupplier getTokenMapSupplier() { final Map<Host, HostToken> tokenMap = new HashMap<Host, HostToken>(); tokenMap.put(h1, new HostToken(1383429731L, h1)); tokenMap.put(h2, new HostToken(3530913377L, h2)); tokenMap.put(h3, new HostToken(1383429731L, h3)); tokenMap.put(h4, new HostToken(3530913377L, h4)); tokenMap.put(h5, new HostToken(1383429731L, h5)); tokenMap.put(h6, new HostToken(3530913377L, h6)); return new TokenMapSupplier() { @Override public List<HostToken> getTokens(Set<Host> activeHosts) { return new ArrayList<HostToken>(tokenMap.values()); } @Override public HostToken getTokenForHost(Host host, Set<Host> activeHosts) { return tokenMap.get(host); } }; } private HashPartitioner getMockHashPartitioner(final Long hash) { return new HashPartitioner() { @Override public Long hash(int key) { return hash; } @Override public Long hash(long key) { return hash; } @Override public Long hash(String key) { return hash; } @Override public Long hash(byte[] key) { return hash; } @Override public HostToken getToken(Long keyHash) { throw new RuntimeException("NotImplemented"); } }; } }
5,991
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/lb/TokenAwareSelectionHastagTest.java
/** * Copyright 2017 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.lb; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.Collection; import java.util.Comparator; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; import com.netflix.dyno.connectionpool.HostBuilder; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.BaseOperation; import com.netflix.dyno.connectionpool.HostConnectionPool; import com.netflix.dyno.connectionpool.Host.Status; import com.netflix.dyno.connectionpool.impl.hash.Murmur1HashPartitioner; /** * Test cases to cover the hashtag APIs. * * @author ipapapa * */ public class TokenAwareSelectionHastagTest { private final HostToken host1 = new HostToken(309687905L, new HostBuilder().setHostname("host1").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("{}").createHost()); private final HostToken host2 = new HostToken(1383429731L, new HostBuilder().setHostname("host2").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("{}").createHost()); private final HostToken host3 = new HostToken(2457171554L, new HostBuilder().setHostname("host3").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("{}").createHost()); private final HostToken host4 = new HostToken(3530913377L, new HostBuilder().setHostname("host4").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("{}").createHost()); private final HostToken host5 = new HostToken(309687905L, new HostBuilder().setHostname("host5").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("").createHost()); private final HostToken host6 = new HostToken(1383429731L, new HostBuilder().setHostname("host6").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("").createHost()); private final HostToken host7 = new HostToken(2457171554L, new HostBuilder().setHostname("host7").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("").createHost()); private final HostToken host8 = new HostToken(3530913377L, new HostBuilder().setHostname("host8").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("").createHost()); private final HostToken host9 = new HostToken(309687905L, new HostBuilder().setHostname("host9").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("[]").createHost()); private final HostToken host10 = new HostToken(1383429731L, new HostBuilder().setHostname("host10").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("{}").createHost()); private final HostToken host11 = new HostToken(2457171554L, new HostBuilder().setHostname("host11").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("//").createHost()); private final HostToken host12 = new HostToken(3530913377L, new HostBuilder().setHostname("host12").setPort(-1).setRack("r1").setStatus(Status.Up).setHashtag("--").createHost()); private final Murmur1HashPartitioner m1Hash = new Murmur1HashPartitioner(); String hashValue = "bar"; @Test public void testTokenAwareWithHashtag() throws Exception { TreeMap<HostToken, HostConnectionPool<Integer>> pools = new TreeMap<HostToken, HostConnectionPool<Integer>>( new Comparator<HostToken>() { @Override public int compare(HostToken o1, HostToken o2) { return o1.getHost().getHostAddress().compareTo(o2.getHost().getHostAddress()); } }); pools.put(host1, getMockHostConnectionPool(host1)); pools.put(host2, getMockHostConnectionPool(host2)); pools.put(host3, getMockHostConnectionPool(host3)); pools.put(host4, getMockHostConnectionPool(host4)); String hashtag = host1.getHost().getHashtag(); TokenAwareSelection<Integer> tokenAwareSelector = new TokenAwareSelection<Integer>(); tokenAwareSelector.initWithHosts(pools); Map<String, Integer> result = new HashMap<String, Integer>(); runTest(0L, 100000L, result, tokenAwareSelector, hashtag, 0); System.out.println("Token distribution: " + result); verifyTokenDistribution(result.values()); } @Test public void testTokenAwareWithEmptyHashtag() throws Exception { TreeMap<HostToken, HostConnectionPool<Integer>> pools = new TreeMap<HostToken, HostConnectionPool<Integer>>( new Comparator<HostToken>() { @Override public int compare(HostToken o1, HostToken o2) { return o1.getHost().getHostAddress().compareTo(o2.getHost().getHostAddress()); } }); pools.put(host5, getMockHostConnectionPool(host5)); pools.put(host6, getMockHostConnectionPool(host6)); pools.put(host7, getMockHostConnectionPool(host7)); pools.put(host8, getMockHostConnectionPool(host8)); String hashtag = host5.getHost().getHashtag(); TokenAwareSelection<Integer> tokenAwareSelector = new TokenAwareSelection<Integer>(); tokenAwareSelector.initWithHosts(pools); Map<String, Integer> result = new HashMap<String, Integer>(); runTest(0L, 100000L, result, tokenAwareSelector, hashtag, 1); System.out.println("Token distribution: " + result); verifyTokenDistribution(result.values()); } @Test public void testTokenAwareWithMultipleHashtag() throws Exception { TreeMap<HostToken, HostConnectionPool<Integer>> pools = new TreeMap<HostToken, HostConnectionPool<Integer>>( new Comparator<HostToken>() { @Override public int compare(HostToken o1, HostToken o2) { return o1.getHost().getHostAddress().compareTo(o2.getHost().getHostAddress()); } }); pools.put(host9, getMockHostConnectionPool(host9)); pools.put(host10, getMockHostConnectionPool(host10)); pools.put(host11, getMockHostConnectionPool(host11)); pools.put(host12, getMockHostConnectionPool(host12)); String hashtag = host9.getHost().getHashtag(); TokenAwareSelection<Integer> tokenAwareSelector = new TokenAwareSelection<Integer>(); tokenAwareSelector.initWithHosts(pools); Map<String, Integer> result = new HashMap<String, Integer>(); runTest(0L, 100000L, result, tokenAwareSelector, hashtag, 2); System.out.println("Token distribution: " + result); verifyTokenDistribution(result.values()); } private BaseOperation<Integer, Long> getTestOperationWithHashtag(final Long n) { return new BaseOperation<Integer, Long>() { @Override public String getName() { return "TestOperation" + n; } @Override public String getStringKey() { return n + "-{" + hashValue + "}"; } @Override public byte[] getBinaryKey() { return null; } }; } private void runTest(long start, long end, Map<String, Integer> result, TokenAwareSelection<Integer> tokenAwareSelector, String hashtag, int testSelector) { for (long i = start; i <= end; i++) { BaseOperation<Integer, Long> op = getTestOperationWithHashtag(i); HostConnectionPool<Integer> pool = tokenAwareSelector.getPoolForOperation(op, hashtag); String hostName = pool.getHost().getHostAddress(); if (testSelector == 0) { verifyHashtagHash(op.getStringKey(), hostName, hashtag); } else if (testSelector == 1) { verifyEmptyHashtagHash(op.getStringKey(), hostName, hashtag); } else { verifyDifferentHashtagHash(op.getStringKey(), hostName, hashtag); } Integer count = result.get(hostName); if (count == null) { count = 0; } result.put(hostName, ++count); } } private void verifyHashtagHash(String key, String hostname, String hashtag) { Long hashtagHash = m1Hash.hash(hashValue); String expectedHostname = null; if (hashtagHash <= 309687905L) { expectedHostname = "host1"; } else if (hashtagHash <= 1383429731L) { expectedHostname = "host2"; } else if (hashtagHash <= 2457171554L) { expectedHostname = "host3"; } else if (hashtagHash <= 3530913377L) { expectedHostname = "host4"; } else { expectedHostname = "host1"; } if (!expectedHostname.equals(hostname)) { Assert.fail("FAILED! for hashtag: " + hashtag + ", got hostname: " + hostname + ", expected: " + expectedHostname + " for hash: " + hashtagHash); } } private void verifyEmptyHashtagHash(String key, String hostname, String hashtag) { // hashtag is empty so we can use the key as the basis for hashing Long hashtagHash = m1Hash.hash(key); String expectedHostname = null; if (hashtagHash <= 309687905L) { expectedHostname = "host5"; } else if (hashtagHash <= 1383429731L) { expectedHostname = "host6"; } else if (hashtagHash <= 2457171554L) { expectedHostname = "host7"; } else if (hashtagHash <= 3530913377L) { expectedHostname = "host8"; } else { expectedHostname = "host5"; } if (!expectedHostname.equals(hostname)) { Assert.fail("FAILED! for hashtag: " + hashtag + " and hash value: " + hashValue + " --> got hostname: " + hostname + ", expected: " + expectedHostname + " for hash: " + hashtagHash); } } private void verifyDifferentHashtagHash(String key, String hostname, String hashtag) { Long hashtagHash = m1Hash.hash(hashValue); String expectedHostname = null; if (hashtagHash <= 309687905L) { expectedHostname = "host9"; } else if (hashtagHash <= 1383429731L) { expectedHostname = "host10"; } else if (hashtagHash <= 2457171554L) { expectedHostname = "host11"; } else if (hashtagHash <= 3530913377L) { expectedHostname = "host12"; } else { expectedHostname = "host9"; } if (expectedHostname.equals(hostname)) { Assert.fail("FAILED! for hashtag: " + hashtag + " and hash value: " + hashValue + " --> got hostname: " + hostname + ", expected: " + expectedHostname + " for hash: " + hashtagHash); } } private void verifyTokenDistribution(Collection<Integer> values) { int sum = 0; int count = 0; for (int n : values) { sum += n; count++; } double mean = (sum / count); for (int n : values) { double percentageDiff = 100 * ((mean - n) / mean); Assert.assertTrue(percentageDiff < 1.0); } } @SuppressWarnings("unchecked") public HostConnectionPool<Integer> getMockHostConnectionPool(final HostToken hostToken) { HostConnectionPool<Integer> mockHostPool = mock(HostConnectionPool.class); when(mockHostPool.isActive()).thenReturn(true); when(mockHostPool.getHost()).thenReturn(hostToken.getHost()); return mockHostPool; } }
5,992
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/lb/TokenAwareSelectionBinaryTest.java
/** * Copyright 2017 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.lb; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.Comparator; import java.util.HashMap; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.Collection; import java.util.Map; import java.util.TreeMap; import com.netflix.dyno.connectionpool.HostBuilder; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.BaseOperation; import com.netflix.dyno.connectionpool.HostConnectionPool; import com.netflix.dyno.connectionpool.Host.Status; import com.netflix.dyno.connectionpool.impl.hash.Murmur1HashPartitioner; /* author: ipapapa */ public class TokenAwareSelectionBinaryTest { /** * cqlsh:dyno_bootstrap> select "availabilityZone","hostname","token" from * tokens where "appId" = 'dynomite_redis_puneet'; * * availabilityZone | hostname | token * ------------------+--------------------------------------------+------------ * us-east-1c | ec2-54-83-179-213.compute-1.amazonaws.com | 1383429731 * us-east-1c | ec2-54-224-184-99.compute-1.amazonaws.com | 309687905 us-east-1c * | ec2-54-91-190-159.compute-1.amazonaws.com | 3530913377 us-east-1c | * ec2-54-81-31-218.compute-1.amazonaws.com | 2457171554 us-east-1e | * ec2-54-198-222-153.compute-1.amazonaws.com | 309687905 us-east-1e | * ec2-54-198-239-231.compute-1.amazonaws.com | 2457171554 us-east-1e | * ec2-54-226-212-40.compute-1.amazonaws.com | 1383429731 us-east-1e | * ec2-54-197-178-229.compute-1.amazonaws.com | 3530913377 * * cqlsh:dyno_bootstrap> */ private static final String UTF_8 = "UTF-8"; private static final Charset charset = Charset.forName(UTF_8); private final HostToken h1 = new HostToken(309687905L, new HostBuilder().setHostname("h1").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h2 = new HostToken(1383429731L, new HostBuilder().setHostname("h2").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h3 = new HostToken(2457171554L, new HostBuilder().setHostname("h3").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h4 = new HostToken(3530913377L, new HostBuilder().setHostname("h4").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h1p8100 = new HostToken(309687905L, new HostBuilder().setHostname("h1").setPort(8100).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h1p8101 = new HostToken(1383429731L, new HostBuilder().setHostname("h1").setPort(8101).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h1p8102 = new HostToken(2457171554L, new HostBuilder().setHostname("h1").setPort(8102).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h1p8103 = new HostToken(3530913377L, new HostBuilder().setHostname("h1").setPort(8103).setRack("r1").setStatus(Status.Up).createHost()); private final Murmur1HashPartitioner m1Hash = new Murmur1HashPartitioner(); @Test public void testTokenAware() throws Exception { TreeMap<HostToken, HostConnectionPool<Integer>> pools = new TreeMap<HostToken, HostConnectionPool<Integer>>( new Comparator<HostToken>() { @Override public int compare(HostToken o1, HostToken o2) { return o1.getHost().getHostAddress().compareTo(o2.getHost().getHostAddress()); } }); pools.put(h1, getMockHostConnectionPool(h1)); pools.put(h2, getMockHostConnectionPool(h2)); pools.put(h3, getMockHostConnectionPool(h3)); pools.put(h4, getMockHostConnectionPool(h4)); TokenAwareSelection<Integer> tokenAwareSelector = new TokenAwareSelection<Integer>(); tokenAwareSelector.initWithHosts(pools); Map<String, Integer> result = new HashMap<String, Integer>(); runTest(0L, 100000L, result, tokenAwareSelector); System.out.println("Token distribution: " + result); verifyTokenDistribution(result.values()); } @Test public void testTokenAwareMultiplePorts() throws Exception { TreeMap<HostToken, HostConnectionPool<Integer>> pools = new TreeMap<HostToken, HostConnectionPool<Integer>>( new Comparator<HostToken>() { @Override public int compare(HostToken o1, HostToken o2) { return o1.compareTo(o2); } }); pools.put(h1p8100, getMockHostConnectionPool(h1p8100)); pools.put(h1p8101, getMockHostConnectionPool(h1p8101)); pools.put(h1p8102, getMockHostConnectionPool(h1p8102)); pools.put(h1p8103, getMockHostConnectionPool(h1p8103)); TokenAwareSelection<Integer> tokenAwareSelector = new TokenAwareSelection<Integer>(); tokenAwareSelector.initWithHosts(pools); Map<Integer, Integer> result = new HashMap<Integer, Integer>(); runTestWithPorts(0L, 100000L, result, tokenAwareSelector); System.out.println("Token distribution: " + result); verifyTokenDistribution(result.values()); } private BaseOperation<Integer, Long> getTestOperation(final Long n) { return new BaseOperation<Integer, Long>() { @Override public String getName() { return "TestOperation" + n; } @Override public String getStringKey() { return "" + n; } @Override public byte[] getBinaryKey() { String key = "" + n; ByteBuffer bb = ByteBuffer.wrap(key.getBytes(charset)); return bb.array(); } }; } private void runTest(long start, long end, Map<String, Integer> result, TokenAwareSelection<Integer> tokenAwareSelector) { for (long i = start; i <= end; i++) { BaseOperation<Integer, Long> op = getTestOperation(i); HostConnectionPool<Integer> pool = tokenAwareSelector.getPoolForOperation(op, null); String hostName = pool.getHost().getHostAddress(); verifyKeyHash(op.getBinaryKey(), hostName); Integer count = result.get(hostName); if (count == null) { count = 0; } result.put(hostName, ++count); } } private void runTestWithPorts(long start, long end, Map<Integer, Integer> result, TokenAwareSelection<Integer> tokenAwareSelector) { for (long i = start; i <= end; i++) { BaseOperation<Integer, Long> op = getTestOperation(i); HostConnectionPool<Integer> pool = tokenAwareSelector.getPoolForOperation(op, null); int port = pool.getHost().getPort(); verifyKeyHashWithPort(op.getBinaryKey(), port); Integer count = result.get(port); if (count == null) { count = 0; } result.put(port, ++count); } } private void verifyKeyHash(byte[] key, String hostname) { Long keyHash = m1Hash.hash(key); String expectedHostname = null; if (keyHash <= 309687905L) { expectedHostname = "h1"; } else if (keyHash <= 1383429731L) { expectedHostname = "h2"; } else if (keyHash <= 2457171554L) { expectedHostname = "h3"; } else if (keyHash <= 3530913377L) { expectedHostname = "h4"; } else { expectedHostname = "h1"; } if (!expectedHostname.equals(hostname)) { Assert.fail("FAILED! for key: " + key.toString() + ", got hostname: " + hostname + ", expected: " + expectedHostname + " for hash: " + keyHash); } } private void verifyKeyHashWithPort(byte[] key, int port) { Long keyHash = m1Hash.hash(key); String expectedHostname = null; int expectedPort = 0; if (keyHash <= 309687905L) { expectedPort = 8100; } else if (keyHash <= 1383429731L) { // 1129055870 expectedPort = 8101; } else if (keyHash <= 2457171554L) { expectedPort = 8102; } else if (keyHash <= 3530913377L) { expectedPort = 8103; } else { expectedPort = 8100; } if (expectedPort != port) { Assert.fail("FAILED! for key: " + key.toString() + ", got port: " + port + ", expected: " + expectedPort + " for hash: " + keyHash); } } private void verifyTokenDistribution(Collection<Integer> values) { int sum = 0; int count = 0; for (int n : values) { sum += n; count++; } double mean = (sum / count); for (int n : values) { double percentageDiff = 100 * ((mean - n) / mean); Assert.assertTrue(percentageDiff < 1.0); } } @SuppressWarnings("unchecked") public HostConnectionPool<Integer> getMockHostConnectionPool(final HostToken hostToken) { HostConnectionPool<Integer> mockHostPool = mock(HostConnectionPool.class); when(mockHostPool.isActive()).thenReturn(true); when(mockHostPool.getHost()).thenReturn(hostToken.getHost()); return mockHostPool; } }
5,993
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/lb/RoundRobinSelectionTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.lb; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.Comparator; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; import com.netflix.dyno.connectionpool.HostBuilder; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.BaseOperation; import com.netflix.dyno.connectionpool.Host.Status; import com.netflix.dyno.connectionpool.HostConnectionPool; public class RoundRobinSelectionTest { /** * cqlsh:dyno_bootstrap> select "availabilityZone","hostname","token" from * tokens where "appId" = 'dynomite_redis_puneet'; * * availabilityZone | hostname | token * ------------------+--------------------------------------------+------------ * us-east-1c | ec2-54-83-179-213.compute-1.amazonaws.com | 1383429731 * us-east-1c | ec2-54-224-184-99.compute-1.amazonaws.com | 309687905 * us-east-1c | ec2-54-91-190-159.compute-1.amazonaws.com | 3530913377 * us-east-1c | ec2-54-81-31-218.compute-1.amazonaws.com | 2457171554 * us-east-1e | ec2-54-198-222-153.compute-1.amazonaws.com | 309687905 * us-east-1e | ec2-54-198-239-231.compute-1.amazonaws.com | 2457171554 * us-east-1e | ec2-54-226-212-40.compute-1.amazonaws.com | 1383429731 * us-east-1e | ec2-54-197-178-229.compute-1.amazonaws.com | 3530913377 * * cqlsh:dyno_bootstrap> */ private final HostToken h1 = new HostToken(309687905L, new HostBuilder().setHostname("h1").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h2 = new HostToken(1383429731L, new HostBuilder().setHostname("h2").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h3 = new HostToken(2457171554L, new HostBuilder().setHostname("h3").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h4 = new HostToken(3530913377L, new HostBuilder().setHostname("h4").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final BaseOperation<Integer, Integer> testOperation = new BaseOperation<Integer, Integer>() { @Override public String getName() { return "TestOperation"; } @Override public String getStringKey() { return null; } @Override public byte[] getBinaryKey() { return null; } }; @Test public void testRoundRobin() throws Exception { TreeMap<HostToken, HostConnectionPool<Integer>> pools = new TreeMap<HostToken, HostConnectionPool<Integer>>( new Comparator<HostToken>() { @Override public int compare(HostToken o1, HostToken o2) { return o1.getHost().getHostAddress().compareTo(o2.getHost().getHostAddress()); } }); // instantiate 3 host connection pools pools.put(h1, getMockHostConnectionPool(h1)); pools.put(h2, getMockHostConnectionPool(h2)); pools.put(h3, getMockHostConnectionPool(h3)); RoundRobinSelection<Integer> rrSelection = new RoundRobinSelection<Integer>(); rrSelection.initWithHosts(pools); Map<String, Integer> result = new HashMap<String, Integer>(); runTest(300, result, rrSelection); verifyTest(result, hostCount("h1", 100), hostCount("h2", 100), hostCount("h3", 100)); // Add a new host rrSelection.addHostPool(h4, getMockHostConnectionPool(h4)); runTest(400, result, rrSelection); verifyTest(result, hostCount("h1", 200), hostCount("h2", 200), hostCount("h3", 200), hostCount("h4", 100)); // remove an old host rrSelection.removeHostPool(h2); runTest(600, result, rrSelection); verifyTest(result, hostCount("h1", 400), hostCount("h2", 200), hostCount("h3", 400), hostCount("h4", 300)); } private void runTest(int iterations, Map<String, Integer> result, RoundRobinSelection<Integer> rrSelection) { for (int i = 1; i <= iterations; i++) { HostConnectionPool<Integer> pool = rrSelection.getPoolForOperation(testOperation, null); String hostName = pool.getHost().getHostAddress(); Integer count = result.get(hostName); if (count == null) { count = 0; } result.put(hostName, ++count); } } private void verifyTest(Map<String, Integer> result, HostCount... hostCounts) { for (HostCount hostCount : hostCounts) { Integer resultCount = result.get(hostCount.host); Assert.assertEquals(hostCount.count, resultCount); } } private static class HostCount { private final String host; private final Integer count; private HostCount(String host, Integer count) { this.host = host; this.count = count; } } private HostCount hostCount(String host, Integer count) { return new HostCount(host, count); } @SuppressWarnings("unchecked") private HostConnectionPool<Integer> getMockHostConnectionPool(final HostToken hostToken) { HostConnectionPool<Integer> mockHostPool = mock(HostConnectionPool.class); when(mockHostPool.isActive()).thenReturn(true); when(mockHostPool.getHost()).thenReturn(hostToken.getHost()); return mockHostPool; } }
5,994
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/lb/TokenAwareSelectionTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.lb; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.Comparator; import java.util.HashMap; import java.util.Collection; import java.util.Map; import java.util.TreeMap; import com.netflix.dyno.connectionpool.HostBuilder; import org.junit.Assert; import org.junit.Test; import com.netflix.dyno.connectionpool.BaseOperation; import com.netflix.dyno.connectionpool.HostConnectionPool; import com.netflix.dyno.connectionpool.Host.Status; import com.netflix.dyno.connectionpool.impl.hash.Murmur1HashPartitioner; public class TokenAwareSelectionTest { /** cqlsh:dyno_bootstrap> select "availabilityZone","hostname","token" from tokens where "appId" = 'dynomite_redis_puneet'; availabilityZone | hostname | token ------------------+--------------------------------------------+------------ us-east-1c | ec2-54-83-179-213.compute-1.amazonaws.com | 1383429731 us-east-1c | ec2-54-224-184-99.compute-1.amazonaws.com | 309687905 us-east-1c | ec2-54-91-190-159.compute-1.amazonaws.com | 3530913377 us-east-1c | ec2-54-81-31-218.compute-1.amazonaws.com | 2457171554 us-east-1e | ec2-54-198-222-153.compute-1.amazonaws.com | 309687905 us-east-1e | ec2-54-198-239-231.compute-1.amazonaws.com | 2457171554 us-east-1e | ec2-54-226-212-40.compute-1.amazonaws.com | 1383429731 us-east-1e | ec2-54-197-178-229.compute-1.amazonaws.com | 3530913377 cqlsh:dyno_bootstrap> */ private final HostToken h1 = new HostToken(309687905L, new HostBuilder().setHostname("h1").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h2 = new HostToken(1383429731L, new HostBuilder().setHostname("h2").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h3 = new HostToken(2457171554L, new HostBuilder().setHostname("h3").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h4 = new HostToken(3530913377L, new HostBuilder().setHostname("h4").setPort(-1).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h1p8100 = new HostToken(309687905L, new HostBuilder().setHostname("h1").setPort(8100).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h1p8101 = new HostToken(1383429731L, new HostBuilder().setHostname("h1").setPort(8101).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h1p8102 = new HostToken(2457171554L, new HostBuilder().setHostname("h1").setPort(8102).setRack("r1").setStatus(Status.Up).createHost()); private final HostToken h1p8103 = new HostToken(3530913377L, new HostBuilder().setHostname("h1").setPort(8103).setRack("r1").setStatus(Status.Up).createHost()); private final Murmur1HashPartitioner m1Hash = new Murmur1HashPartitioner(); @Test public void testTokenAware() throws Exception { TreeMap<HostToken, HostConnectionPool<Integer>> pools = new TreeMap<HostToken, HostConnectionPool<Integer>>(new Comparator<HostToken>() { @Override public int compare(HostToken o1, HostToken o2) { return o1.getHost().getHostAddress().compareTo(o2.getHost().getHostAddress()); } }); pools.put(h1, getMockHostConnectionPool(h1)); pools.put(h2, getMockHostConnectionPool(h2)); pools.put(h3, getMockHostConnectionPool(h3)); pools.put(h4, getMockHostConnectionPool(h4)); TokenAwareSelection<Integer> tokenAwareSelector = new TokenAwareSelection<Integer>(); tokenAwareSelector.initWithHosts(pools); Map<String, Integer> result = new HashMap<String, Integer>(); runTest(0L, 100000L, result, tokenAwareSelector); System.out.println("Token distribution: " + result); verifyTokenDistribution(result.values()); } @Test public void testTokenAwareMultiplePorts() throws Exception { TreeMap<HostToken, HostConnectionPool<Integer>> pools = new TreeMap<HostToken, HostConnectionPool<Integer>>(new Comparator<HostToken>() { @Override public int compare(HostToken o1, HostToken o2) { return o1.compareTo(o2); } }); pools.put(h1p8100, getMockHostConnectionPool(h1p8100)); pools.put(h1p8101, getMockHostConnectionPool(h1p8101)); pools.put(h1p8102, getMockHostConnectionPool(h1p8102)); pools.put(h1p8103, getMockHostConnectionPool(h1p8103)); TokenAwareSelection<Integer> tokenAwareSelector = new TokenAwareSelection<Integer>(); tokenAwareSelector.initWithHosts(pools); Map<Integer, Integer> result = new HashMap<Integer, Integer>(); runTestWithPorts(0L, 100000L, result, tokenAwareSelector); System.out.println("Token distribution: " + result); verifyTokenDistribution(result.values()); } private BaseOperation<Integer, Long> getTestOperation(final Long n) { return new BaseOperation<Integer, Long>() { @Override public String getName() { return "TestOperation" + n; } @Override public String getStringKey() { return "" + n; } @Override public byte[] getBinaryKey() { return null; } }; } private void runTest(long start, long end, Map<String, Integer> result, TokenAwareSelection<Integer> tokenAwareSelector) { for (long i = start; i <= end; i++) { BaseOperation<Integer, Long> op = getTestOperation(i); HostConnectionPool<Integer> pool = tokenAwareSelector.getPoolForOperation(op, null); String hostName = pool.getHost().getHostAddress(); verifyKeyHash(op.getStringKey(), hostName); Integer count = result.get(hostName); if (count == null) { count = 0; } result.put(hostName, ++count); } } private void runTestWithPorts(long start, long end, Map<Integer, Integer> result, TokenAwareSelection<Integer> tokenAwareSelector) { for (long i = start; i <= end; i++) { BaseOperation<Integer, Long> op = getTestOperation(i); HostConnectionPool<Integer> pool = tokenAwareSelector.getPoolForOperation(op, null); int port = pool.getHost().getPort(); verifyKeyHashWithPort(op.getStringKey(), port); Integer count = result.get(port); if (count == null) { count = 0; } result.put(port, ++count); } } private void verifyKeyHash(String key, String hostname) { Long keyHash = m1Hash.hash(key); String expectedHostname = null; if (keyHash <= 309687905L) { expectedHostname = "h1"; } else if (keyHash <= 1383429731L) { expectedHostname = "h2"; } else if (keyHash <= 2457171554L) { expectedHostname = "h3"; } else if (keyHash <= 3530913377L) { expectedHostname = "h4"; } else { expectedHostname = "h1"; } if (!expectedHostname.equals(hostname)) { Assert.fail("FAILED! for key: " + key + ", got hostname: " + hostname + ", expected: " + expectedHostname + " for hash: " + keyHash); } } private void verifyKeyHashWithPort(String key, int port) { Long keyHash = m1Hash.hash(key); String expectedHostname = null; int expectedPort = 0; if (keyHash <= 309687905L) { expectedPort = 8100; } else if (keyHash <= 1383429731L) { //1129055870 expectedPort = 8101; } else if (keyHash <= 2457171554L) { expectedPort = 8102; } else if (keyHash <= 3530913377L) { expectedPort = 8103; } else { expectedPort = 8100; } if (expectedPort != port) { Assert.fail("FAILED! for key: " + key + ", got port: " + port + ", expected: " + expectedPort + " for hash: " + keyHash); } } private void verifyTokenDistribution(Collection<Integer> values) { int sum = 0; int count = 0; for (int n : values) { sum += n; count++; } double mean = (sum / count); for (int n : values) { double percentageDiff = 100 * ((mean - n) / mean); Assert.assertTrue(percentageDiff < 1.0); } } @SuppressWarnings("unchecked") public HostConnectionPool<Integer> getMockHostConnectionPool(final HostToken hostToken) { HostConnectionPool<Integer> mockHostPool = mock(HostConnectionPool.class); when(mockHostPool.isActive()).thenReturn(true); when(mockHostPool.getHost()).thenReturn(hostToken.getHost()); return mockHostPool; } }
5,995
0
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl
Create_ds/dyno/dyno-core/src/test/java/com/netflix/dyno/connectionpool/impl/utils/RateLimitUtilTest.java
/** * Copyright 2016 Netflix, Inc. * <p> * Licensed 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.dyno.connectionpool.impl.utils; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; import org.junit.Assert; import org.junit.Test; public class RateLimitUtilTest { @Test public void testRate() throws Exception { int nThreads = 5; int expectedRps = 100; final RateLimitUtil rateLimiter = RateLimitUtil.create(expectedRps); final AtomicBoolean stop = new AtomicBoolean(false); final AtomicLong counter = new AtomicLong(0L); final CountDownLatch latch = new CountDownLatch(nThreads); ExecutorService thPool = Executors.newFixedThreadPool(nThreads); final CyclicBarrier barrier = new CyclicBarrier(nThreads + 1); final AtomicLong end = new AtomicLong(0L); for (int i = 0; i < nThreads; i++) { thPool.submit(new Callable<Void>() { @Override public Void call() throws Exception { barrier.await(); while (!stop.get()) { if (rateLimiter.acquire()) { counter.incrementAndGet(); } } latch.countDown(); return null; } }); } long start = System.currentTimeMillis(); barrier.await(); Thread.sleep(10000); stop.set(true); latch.await(); end.set(System.currentTimeMillis()); thPool.shutdownNow(); long duration = end.get() - start; long totalCount = counter.get(); double resultRps = ((double) (totalCount) / ((double) duration / 1000.0)); System.out.println("Total Count : " + totalCount + ", duration: " + duration + ", result rps: " + resultRps); double percentageDiff = Math.abs(expectedRps - resultRps) * 100 / resultRps; System.out.println("Percentage diff: " + percentageDiff); Assert.assertTrue(percentageDiff < 12.0); } }
5,996
0
Create_ds/dyno/dyno-core/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-core/src/main/java/com/netflix/dyno/connectionpool/HostConnectionStats.java
/******************************************************************************* * Copyright 2011 Netflix * * Licensed 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/ package com.netflix.dyno.connectionpool; /** * Stats for connection operations for each {@code Host} * These are tracked by the {@link ConnectionPoolMonitor} for the {@link ConnectionPool} * * @author poberai */ public interface HostConnectionStats { /** * @return boolean */ public boolean isHostUp(); /** * @return long */ public long getConnectionsBorrowed(); /** * @return long */ public long getConnectionsReturned(); /** * @return long */ public long getConnectionsCreated(); /** * @return long */ public long getConnectionsClosed(); /** * @return long */ public long getConnectionsCreateFailed(); /** * @return long */ public long getOperationSuccessCount(); /** * @return long */ public long getOperationErrorCount(); }
5,997
0
Create_ds/dyno/dyno-core/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-core/src/main/java/com/netflix/dyno/connectionpool/CompressionOperation.java
/******************************************************************************* * Copyright 2015 Netflix * * Licensed 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/ package com.netflix.dyno.connectionpool; /** * */ public interface CompressionOperation<CL, R> extends Operation<CL, R> { String compressValue(String value, ConnectionContext ctx); String decompressValue(String value, ConnectionContext ctx); }
5,998
0
Create_ds/dyno/dyno-core/src/main/java/com/netflix/dyno
Create_ds/dyno/dyno-core/src/main/java/com/netflix/dyno/connectionpool/ConnectionPoolConfiguration.java
/******************************************************************************* * Copyright 2011 Netflix * * Licensed 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/ package com.netflix.dyno.connectionpool; import com.netflix.dyno.connectionpool.RetryPolicy.RetryPolicyFactory; import com.netflix.dyno.connectionpool.impl.health.ErrorMonitor.ErrorMonitorFactory; /** * Specifies configuration settings for an instance of a dyno connection pool. */ public interface ConnectionPoolConfiguration { enum LoadBalancingStrategy { RoundRobin, TokenAware; } enum CompressionStrategy { /** * Disables compression */ NONE, /** * Compresses values that exceed {@link #getValueCompressionThreshold()} */ THRESHOLD } /** * Should connections in this pool connect to the datastore directly? * @return */ boolean isConnectToDatastore(); /** * Returns 'true' if a connection-pool level consistency setting was provided. * @return */ boolean isConnectionPoolConsistencyProvided(); boolean isFallbackEnabled(); /** * Returns the voting size for dyno lock * @return */ int getLockVotingSize(); /** * Returns the unique name assigned to this connection pool. */ String getName(); /** * Returns the maximum number of connections to allocate to each Dynomite host. Note that at startup exactly this * number of connections will be established prior to serving requests. */ int getMaxConnsPerHost(); /** * Returns the maximum amount of time to wait for a connection to become available from the pool. * * <p>Retrieving a connection from the pool is very fast unless all connections are busy (in which case the * connection pool is exhausted)</p> */ int getMaxTimeoutWhenExhausted(); /** * Returns the maximum number of failover attempts. */ int getMaxFailoverCount(); /** * Returns the socket read/write timeout */ int getSocketTimeout(); /** * Returns the {@link LoadBalancingStrategy} for this connection pool. */ LoadBalancingStrategy getLoadBalancingStrategy(); /** * Specifies the socket connection timeout */ int getConnectTimeout(); /** * Returns true if the connection pool respects zone affinity, false otherwise. * * <p> * By default this is true. This is only false if it has been explicitly set to false OR if the connection pool * cannot determine it's local zone at startup. * </p> */ boolean localZoneAffinity(); /** * Returns the {@link ErrorMonitorFactory} to use for this connection pool. */ ErrorMonitorFactory getErrorMonitorFactory(); /** * Returns the {@link RetryPolicyFactory} to use for this connection pool. */ RetryPolicyFactory getRetryPolicyFactory(); /** * Returns the {@link HostSupplier} to use for this connection pool. */ HostSupplier getHostSupplier(); /** * Returns the {@link TokenMapSupplier} to use for this connection pool. */ TokenMapSupplier getTokenSupplier(); /** * Returns the {@link HashPartitioner} for this connection pool. * * @return */ HashPartitioner getHashPartitioner(); /** * Returns the interval for which pings are issued on connections. * * <p> * Pings are used to keep persistent connections warm. * </p> */ int getPingFrequencySeconds(); /** * Returns the local rack name for this connection pool. In AWS terminology this is a zone, e.g. us-east-1c. */ String getLocalRack(); /** * Returns the local data center name for this connection pool. In AWS terminology this is a region, e.g. us-east-1. */ String getLocalDataCenter(); /** * Returns the amount of time the histogram accumulates data before it is cleared, in seconds. * <p> * A histogram is used to record timing metrics. This provides more accurate timings to telemetry systems that * are polling at a fixed interval that spans hundreds or thousands of requests, i.e. 1 minute. Since the history * off all requests are preserved this is not ideal for scenarios where we don't want the history, for example * after a network latency spike the average latency will be affected for hours or days. * <p> * Note that 0 is the default and effectively disables this setting meaning all history is preserved. * * @return a positive integer that specifies the duration of the frequency to accumulate timing data or 0 */ int getTimingCountersResetFrequencySeconds(); /** * This is an experimental setting and as such is unstable and subject to change or be removed. * <p> * Returns info about a system that will consume configuration data from dyno. This is used to * log configuration settings to a central system such as elastic search or cassandra. * </p> */ String getConfigurationPublisherConfig(); /** * If there are no hosts marked as 'Up' in the {@link HostSupplier} when starting the connection pool * a {@link com.netflix.dyno.connectionpool.exception.NoAvailableHostsException} will be thrown * if this is set to true. By default this is false. * <p> * When this does occur and this property is set to false, a warning will be logged and the connection pool * will go into an idle state, polling once per minute in the background for available hosts to connect to. * The connection pool can idle indefinitely. In the event that hosts do become available, the connection * pool will start. * </p> * * @return boolean to control the startup behavior specified in the description. */ boolean getFailOnStartupIfNoHosts(); /** * This works in conjunction with {@link #getCompressionStrategy()}. The compression strategy must be set to * {@link CompressionStrategy#THRESHOLD} for this to have any effect. * <p> * The value for this configuration setting is specified in <strong>bytes</strong> * * @return The final value to be used as a threshold in bytes. */ int getValueCompressionThreshold(); /** * Determines if values should be compressed prior to sending them across the wire to Dynomite. Note that this * feature <strong>is disabled by default</strong>. * <p> * Note that if compression is not enabled, no attempt to compress or decompress any data is made. If compression * has been enabled and needs to be disabled, rather than disabling compression it is recommended to set the * threshold to a large number so that effectively nothing will be compressed however data retrieved will still * be decompressed. * * @return the configured compression strategy value */ CompressionStrategy getCompressionStrategy(); /** * Returns true if dual-write functionality is enabled, false otherwise. */ boolean isDualWriteEnabled(); /** * Returns the name of the designated dual-write cluster, or null. */ String getDualWriteClusterName(); /** * Returns the percentage of traffic designated to be sent to the dual-write cluster. */ int getDualWritePercentage(); /** * Returns the schedule time delay in milliseconds for the connection pool health tracker */ int getHealthTrackerDelayMillis(); /** * Returns the amount of time pool reconnect has to wait before establishing new connections. * * @return */ int getPoolReconnectWaitMillis(); /** * Returns the user-provided connection pool level consistency setting if provided. * * @return */ String getConnectionPoolConsistency(); String getHashtag(); ConnectionPoolConfiguration setLocalZoneAffinity(boolean condition); }
5,999