FabricRuntime クラス
- java.
lang. Object - AutoCloseable
- system.
fabric. FabricRuntime
- system.
public class FabricRuntime
ユーザーが作成したホストが、 を CodePackageActivationContext取得したり、必要なサービス ファクトリ [ StatelessServiceFactory、] StatefulServiceFactory 、またはサービスの種類を直接登録したりできます。
メソッドの概要
修飾子と型 | メソッドと説明 |
---|---|
void |
close()
関連付けられているインスタンスを閉じ、関連付 FabricCodePackageActivationContext けられているランタイム ポインターを解放します。 |
Fabric |
create()
オブジェクトを system.fabric.FabricRuntime 作成します。 |
CompletableFuture<Fabric |
createAsync(Duration timeout)
指定したタイムアウト パラメーターを system.fabric.FabricRuntime 使用して、オブジェクトを非同期的に作成します。 |
CompletableFuture<Fabric |
createAsync(Runnable fabricExitCallback, Duration timeout)
基になるランタイムが system.fabric.FabricRuntime 何らかの理由で終了または終了した場合に実行される、指定されたコールバック関数を使用して、オブジェクトを非同期的に作成します。 |
Fabric |
getActivationContext()
現在system.fabric.FabricRuntimeCodePackageActivationContextの の を取得します。 |
CompletableFuture<Fabric |
getActivationContextAsync(Duration timeout)
指定したパラメーターを使用して、現在 system.fabric.FabricRuntimeの の CodePackageActivationContext を非同期的に取得します。 |
Node |
getNodeContext()
Fabric Node に関する情報を含む Node Context オブジェクトを取得します。 |
CompletableFuture<Node |
getNodeContextAsync(Duration timeout)
タイムアウトおよびキャンセル トークンを使用して、ファブリック ノードからノード コンテキストを非同期的に取得します。 |
void |
registerServiceType(String serviceTypeName, Class<?> serviceTypeImplementation)
指定した serviceTypeName を、それを実装する実際のマネージド型に関連付けます。
発言:サービスの種類の登録のこのメカニズムでは、カスタム StatelessServiceFactory または StatefulServiceFactory 登録時に提供する必要はありません。 Service Fabric は実行時に生成され、自動的に利用されます。 ファクトリのカスタム実装が必要な場合は、 または を実装StatelessServiceFactoryし、対応するファクトリ登録メソッド ( system.fabric.FabricRuntime#registerStatelessServiceFactoryAsync(java.lang.String, system.fabric.StatelessServiceFactory, java.time.Duration) または system.fabric.FabricRuntime#registerStatefulServiceFactoryAsync(java.lang.String, system.fabric.StatefulServiceFactory, java.time.Duration) ) を使用して提供StatefulServiceFactoryできます。 |
CompletableFuture<?> |
registerServiceTypeAsync(String serviceTypeName, Class<?> serviceTypeImplementation, Duration timeout)
指定した serviceTypeName を、それを実装する実際のマネージド型に非同期的に関連付け、タイムアウトを指定します |
void |
registerStatefulServiceFactory(String serviceTypeName, StatefulServiceFactory factory)
指定した StatefulServiceFactory サービスの種類に指定した を登録します。 |
CompletableFuture<?> |
registerStatefulServiceFactoryAsync(String serviceTypeName, StatefulServiceFactory factory, Duration timeout)
指定したサービスの種類に対して指定した StatefulServiceFactory を、指定したタイムアウトと cancellationToken に登録します。 |
void |
registerStatelessServiceFactory(String serviceTypeName, StatelessServiceFactory factory)
指定した StatelessServiceFactory サービスの種類に指定した を登録します。 |
CompletableFuture<?> |
registerStatelessServiceFactoryAsync(String serviceTypeName, StatelessServiceFactory factory, Duration timeout)
指定したサービスの種類に対して指定された StatelessServiceFactory を非同期に登録し、指定されたタイムアウトと cancellationToken を使用します |
メソッドの詳細
close
public void close()
関連付けられているインスタンスを閉じ、関連付 FabricCodePackageActivationContext けられているランタイム ポインターを解放します。
create
public static FabricRuntime create()
オブジェクトを system.fabric.FabricRuntime 作成します。
戻り値:
createAsync
public static CompletableFuture
指定したタイムアウト パラメーターを system.fabric.FabricRuntime 使用して、オブジェクトを非同期的に作成します。
パラメーター:
戻り値:
createAsync
public static CompletableFuture
基になるランタイムが system.fabric.FabricRuntime 何らかの理由で終了または終了した場合に実行される、指定されたコールバック関数を使用して、オブジェクトを非同期的に作成します。
パラメーター:
戻り値:
getActivationContext
public static FabricCodePackageActivationContext getActivationContext()
現在system.fabric.FabricRuntimeCodePackageActivationContextの の を取得します。
戻り値:
getActivationContextAsync
public static CompletableFuture
指定したパラメーターを使用して、現在 system.fabric.FabricRuntimeの の CodePackageActivationContext を非同期的に取得します。
パラメーター:
戻り値:
getNodeContext
public static NodeContext getNodeContext()
Fabric Node に関する情報を含む Node Context オブジェクトを取得します。
戻り値:
getNodeContextAsync
public static CompletableFuture
タイムアウトおよびキャンセル トークンを使用して、ファブリック ノードからノード コンテキストを非同期的に取得します。
パラメーター:
戻り値:
registerServiceType
public void registerServiceType(String serviceTypeName, Class serviceTypeImplementation)
指定した serviceTypeName を、それを実装する実際のマネージド型に関連付けます。
発言:サービスの種類の登録のこのメカニズムでは、カスタム StatelessServiceFactory または StatefulServiceFactory 登録時に提供する必要はありません。 Service Fabric は実行時に生成され、自動的に利用されます。 ファクトリのカスタム実装が必要な場合は、 または を実装StatelessServiceFactoryし、対応するファクトリ登録メソッド ( system.fabric.FabricRuntime#registerStatelessServiceFactoryAsync(java.lang.String, system.fabric.StatelessServiceFactory, java.time.Duration) または system.fabric.FabricRuntime#registerStatefulServiceFactoryAsync(java.lang.String, system.fabric.StatefulServiceFactory, java.time.Duration) ) を使用して提供StatefulServiceFactoryできます。
パラメーター:
registerServiceTypeAsync
public CompletableFuture registerServiceTypeAsync(String serviceTypeName, Class serviceTypeImplementation, Duration timeout)
指定した serviceTypeName を、それを実装する実際のマネージド型に非同期的に関連付け、タイムアウトを指定します
パラメーター:
戻り値:
registerStatefulServiceFactory
public void registerStatefulServiceFactory(String serviceTypeName, StatefulServiceFactory factory)
指定した StatefulServiceFactory サービスの種類に指定した を登録します。
パラメーター:
registerStatefulServiceFactoryAsync
public CompletableFuture registerStatefulServiceFactoryAsync(String serviceTypeName, StatefulServiceFactory factory, Duration timeout)
指定したサービスの種類に対して指定した StatefulServiceFactory を、指定したタイムアウトと cancellationToken に登録します。
パラメーター:
戻り値:
registerStatelessServiceFactory
public void registerStatelessServiceFactory(String serviceTypeName, StatelessServiceFactory factory)
指定した StatelessServiceFactory サービスの種類に指定した を登録します。
パラメーター:
registerStatelessServiceFactoryAsync
public CompletableFuture registerStatelessServiceFactoryAsync(String serviceTypeName, StatelessServiceFactory factory, Duration timeout)
指定したサービスの種類に対して指定された StatelessServiceFactory を非同期に登録し、指定されたタイムアウトと cancellationToken を使用します
パラメーター:
戻り値:
適用対象
Azure SDK for Java