Compartilhar via


ResourceManagerUtils.InternalRuntimeContext Class

  • java.lang.Object
    • com.azure.resourcemanager.resources.fluentcore.utils.ResourceManagerUtils.InternalRuntimeContext

public static class ResourceManagerUtils.InternalRuntimeContext

The class provides the common methods required for SDK framework. RESERVED FOR INTERNAL USE.

Constructor Summary

Constructor Description
InternalRuntimeContext()

Method Summary

Modifier and Type Method and Description
IdentifierProvider createIdentifierProvider(String name)

Creates a resource namer

static Duration getDelayDuration(Duration delay)

Wrapper for the duration for delay, based on delayProvider.

static Scheduler getReactorScheduler()

Gets the current Rx Scheduler for the SDK framework.

String randomResourceName(String prefix, int maxLen)

Gets a random name.

String randomUuid()

Gets a random UUID.

static void setDelayProvider(DelayProvider delayProvider)

Function to override the DelayProvider.

void setIdentifierFunction(Function<String,IdentifierProvider> identifierFunction)

Sets the resource namer

static void setReactorScheduler(Scheduler reactorScheduler)

Sets the Rx Scheduler for SDK framework, by default is Scheduler.io().

Methods inherited from java.lang.Object

Constructor Details

InternalRuntimeContext

public InternalRuntimeContext()

Method Details

createIdentifierProvider

public IdentifierProvider createIdentifierProvider(String name)

Creates a resource namer

Parameters:

name - the name value.

Returns:

the new resource namer

getDelayDuration

public static Duration getDelayDuration(Duration delay)

Wrapper for the duration for delay, based on delayProvider.

Parameters:

delay - the duration of proposed delay.

Returns:

the duration of delay.

getReactorScheduler

public static Scheduler getReactorScheduler()

Gets the current Rx Scheduler for the SDK framework.

Returns:

current rx scheduler.

randomResourceName

public String randomResourceName(String prefix, int maxLen)

Gets a random name.

Parameters:

prefix - the prefix to be used if possible
maxLen - the maximum length for the random generated name

Returns:

the random name

randomUuid

public String randomUuid()

Gets a random UUID.

Returns:

the random UUID.

setDelayProvider

public static void setDelayProvider(DelayProvider delayProvider)

Function to override the DelayProvider.

Parameters:

delayProvider - delayProvider to override.

setIdentifierFunction

public void setIdentifierFunction(Function identifierFunction)

Sets the resource namer

Parameters:

identifierFunction - the function.

setReactorScheduler

public static void setReactorScheduler(Scheduler reactorScheduler)

Sets the Rx Scheduler for SDK framework, by default is Scheduler.io().

Parameters:

reactorScheduler - current Rx Scheduler to be used in SDK framework.

Applies to