首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏BAT的乌托邦

    [享学Netflix] 五十八、Ribbon负载均衡命令:LoadBalancerCommand(一)基础类打点

    ---- ExecutionContext (重要) 在每个负载均衡器执行开始时创建的上下文对象,包含负载均衡器的某些元数据和的可变状态数据。 <T> parent; // 这样便可以让两个ExecutionContext关联起来 private static class ChildContext<T> extends ExecutionContext <T> { private final ExecutionContext<T> parent; ChildContext(ExecutionContext<T> parent 但是你也可以通过ExecutionContext#getGlobalContext()来得到所有listener全局共享的上下文。 // I:input类型,给ExecutionContext用。

    1.6K10发布于 2020-03-24
  • 来自专栏大内老A

    以上下文(Context)的形式创建一个共享数据的容器

    的编程方式来设计这个ExecutionContext。 如下的代码片段体现了ExecutionContext最基本的编程方式:我们通过ExecutionContextScope 来创建当前ExecutionContext,并且控制它的生命周期。 :内层创建一个全新的ExecutionContext; Suppress:外层的ExecutionContext在内层中使被屏蔽掉,内层的当前ExecutionContext不存在。 <string>(name)); } } 三、ExecutionContext 现在我们来讨论具体的设计和实现,先来看看表示当前执行上下文的ExecutionContext的定义。 ,每个线程的当前ExecutionContext是不同的。

    75160发布于 2018-01-15
  • 来自专栏林德熙的博客

    WPF 升级 .NET Core 的理由

    (ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) System.Threading.ExecutionContext.Run(ExecutionContext executionContext 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext

    1.2K20发布于 2020-04-16
  • 来自专栏WPF

    异步函数async await在wpf都做了什么?

    executionContext = currentThread. _executionContext; ExecutionContext executionContext2 = executionContext; SynchronizationContext synchronizationContext executionContext2; ExecutionContext executionContext4 = thread2. _executionContext; if (executionContext3 ! = executionContext4) { ExecutionContext.RestoreChangedContextToThread(thread2, executionContext3

    1.7K20发布于 2020-06-08
  • 来自专栏chenchenchen

    Spring Batch 批处理(7) - 异常处理及容错机制

    * @throws ItemStreamException */ @Override public void open(ExecutionContext executionContext ) throws ItemStreamException { this.executionContext = executionContext; // 如果是重启job,从数据库读取重启的行数 ,从重启行数开始重新执行 if (executionContext.containsKey("curLine")) { this.curLine = executionContext.getLong executionContext) throws ItemStreamException { // 每执行完一个批次chunk,打印当前行数 System.out.println ("update curLine: " + this.curLine); executionContext.put("curLine", this.curLine); }

    1.9K10发布于 2020-05-26
  • 来自专栏林德熙的博客

    WPF 类型的构造函数执行符合指定的绑定约束的调用时引发了异常

    System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext

    5.2K20发布于 2019-04-22
  • 来自专栏林德熙的博客

    WPF 类型的构造函数执行符合指定的绑定约束的调用时引发了异常

    System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext

    2.8K20编辑于 2022-08-04
  • 来自专栏码匠的流水账

    聊聊flink的ActorGateway

    ExecutionContext which is used to send the message multiple times * @return Future of the response executionContext); ​ /** * Returns the path of the remote instance ExecutionContext which is used to send the message multiple times * @return Future of the response executionContext) { ​ Object newMessage = decorator.decorate(message); ​ return AkkaUtils.retry ( actor, newMessage, numberRetries, executionContext,

    58830发布于 2019-03-16
  • 来自专栏FreeBuf

    分析银行木马的恶意快捷方式及混淆的Powershell

    ('${/=\/==\__/\_/\__/}') -NewName $ExecutionContext.InvokeCommand.ExpandString('${/===\__/\/==\_/==}' \${_/\____/=\/\_/===}') -NewName $ExecutionContext.InvokeCommand.ExpandString('$env:APPDATA\${/=\_/== ('${/=\/==\__/\_/\__/}') -NewName $ExecutionContext.InvokeCommand.ExpandString('${/===\__/\/==\_/==}' \${_/\____/=\/\_/===}') -NewName $ExecutionContext.InvokeCommand.ExpandString('$env:APPDATA\${/=\_/== \${getRandomStringResult2}); ren -Path $ExecutionContext.InvokeCommand.ExpandString($env

    2K20发布于 2019-11-12
  • 来自专栏Java编程技术

    Mysql中使用流式查询避免数据量过大导致OOM-后续

    executionContext) throws ItemStreamException { super.open(executionContext); try { )); } int itemCount = 0; if (executionContext.containsKey(getExecutionContextKey (READ_COUNT))) { itemCount = executionContext.getInt(getExecutionContextKey(READ_COUNT)); executionContext) throws ItemStreamException { super.update(executionContext); if (saveState ) { Assert.notNull(executionContext, "ExecutionContext must not be null"); executionContext.putInt

    4.8K21发布于 2018-09-06
  • 来自专栏centosDai

    调试 .NET Core 中的死锁

    /shared/System/Threading/ExecutionContext.cs @ 201] 00007F2AE37B5CA0 00007f30593044af [GCFrame: 00007f2ae37b5ca0 /shared/System/Threading/ExecutionContext.cs @ 201] 00007F2AE2FB4CA0 00007f30593044af [GCFrame: 00007f2ae2fb4ca0 /shared/System/Threading/ExecutionContext.cs @ 201] 00007F2AE27B3CA0 00007f30593044af [GCFrame: 00007f2ae27b3ca0 /shared/System/Threading/ExecutionContext.cs @ 201] 00007F2AE1FB2CA0 00007f30593044af [GCFrame: 00007f2ae1fb2ca0 /shared/System/Threading/ExecutionContext.cs @ 201] 00007F2AE17B1CA0 00007f30593044af [GCFrame: 00007f2ae17b1ca0

    1K20编辑于 2022-01-09
  • 来自专栏react源码分析

    react源码解析16.concurrent模式

    this.state.count + 1 });}在之前的react版本中如果脱离当前的上下文就不会被合并,例如把多次更新放在setTimeout中,原因是处于同一个context的多次setState的executionContext 都会包含BatchedContext,包含BatchedContext的setState会合并,当executionContext等于NoContext,就会同步执行SyncCallbackQueue中的任务 }); });}export function batchedUpdates<A, R>(fn: A => R, a: A): R { const prevExecutionContext = executionContext ; executionContext |= BatchedContext; try { return fn(a); } finally { executionContext = prevExecutionContext ; if (executionContext === NoContext) { resetRenderTimer(); //executionContext为NoContext

    40110编辑于 2022-11-18
  • 来自专栏技术墨客

    Spring Batch(1)——数据批处理概念

    前文已经多次提到ExecutionContext。 可以简单的认为ExecutionContext提供了一个Key/Value机制,在StepExecution和JobExecution对象的任何位置都可以获取到ExecutionContext中的任何数据 Restart data is: " + executionContext); long lineCount = executionContext.getLong(getKey(LINES_READ_COUNT = null) { record = readLine(); } } ExecutionContext是根据JobInstance进行管理的,因此只要是相同的实例都会具备相同的ExecutionContext 此外通过以下方法都可以获得一个ExecutionContextExecutionContext ecStep = stepExecution.getExecutionContext(); ExecutionContext

    2.3K71发布于 2019-07-04
  • 来自专栏kl的专栏

    spring batch进阶-基于RabbitMQ远程分区Step

    build(); } master节点关键部分是,他的Step需要设置从节点Step的Name,和一个数据分区器,数据分区器需要实现Partitioner接口,它返回一个Map<String, ExecutionContext ExecutionContext保存了从节点要处理的数据边界,当然,ExecutionContext里的参数是根据你的业务来的,我这里,已数据ID为边界划分了每个区。 > result = new HashMap<String, ExecutionContext>(); int number = 0; int start = min; int end = start + targetSize - 1; while (start <= max) { ExecutionContext value = new ExecutionContext(); result.put("partition" + number, value); if

    3.2K70发布于 2018-04-13
  • 来自专栏用户8771298的专栏

    react源码解析16.concurrent模式

    都会包含BatchedContext,包含BatchedContext的setState会合并,当executionContext等于NoContext,就会同步执行SyncCallbackQueue中的任务 }); } export function batchedUpdates<A, R>(fn: A => R, a: A): R { const prevExecutionContext = executionContext ; executionContext |= BatchedContext; try { return fn(a); } finally { executionContext = prevExecutionContext; if (executionContext === NoContext) { resetRenderTimer(); // executionContext为NoContext就同步执行SyncCallbackQueue中的任务 flushSyncCallbackQueue(); } } } ​ 在Concurrent

    36520编辑于 2021-12-06
  • 来自专栏react源码分析

    面试官:react中的setState是同步的还是异步的_2023-02-19

    this.state.count + 1 });}在之前的react版本中如果脱离当前的上下文就不会被合并,例如把多次更新放在setTimeout中,原因是处于同一个context的多次setState的executionContext 都会包含BatchedContext,包含BatchedContext的setState会合并,当executionContext等于NoContext,就会同步执行SyncCallbackQueue中的任务 }); });}export function batchedUpdates<A, R>(fn: A => R, a: A): R { const prevExecutionContext = executionContext ; executionContext |= BatchedContext; try { return fn(a); } finally { executionContext = prevExecutionContext ; if (executionContext === NoContext) { resetRenderTimer(); //executionContext为NoContext

    85320编辑于 2023-02-19
  • 来自专栏技术赋能学术

    .net 温故知新:【5】异步编程 async await

    _executionContext; ExecutionContext executionContext2 = executionContext; SynchronizationContext synchronizationContext _synchronizationContext = synchronizationContext2; } ExecutionContext executionContext3 = executionContext2 ; ExecutionContext executionContext4 = thread2. _executionContext; if (executionContext3 ! = executionContext4) { ExecutionContext.RestoreChangedContextToThread(thread2, executionContext3

    1.1K20发布于 2021-08-31
  • 来自专栏chenchenchen

    Spring Batch 批处理(1) - 简介及使用场景

    前文已经多次提到ExecutionContext。 可以简单的认为ExecutionContext提供了一个Key/Value机制,在StepExecution和JobExecution对象的任何位置都可以获取到ExecutionContext中的任何数据 Restart data is: " + executionContext); long lineCount = executionContext.getLong(getKey(LINES_READ_COUNT ExecutionContext(无论是否停止)。 此外通过以下方法都可以获得一个ExecutionContext: ``` ExecutionContext ecStep = stepExecution.getExecutionContext(); ExecutionContext

    6.5K21发布于 2020-05-27
  • 来自专栏单片机/c#技术分享

    【C#异步】异步多线程的本质,上下文流转和同步

    环境上下文ExecutionContext     ExecutionContext表示管理当前线程的执行上下文。 针对此类,官网的解释是该 ExecutionContext 类为与逻辑执行线程相关的所有信息提供单个容器。 在.NET Framework中,这包括安全上下文、调用上下文和同步上下文。 https://devblogs.microsoft.com/pfxteam/executioncontext-vs-synchronizationcontext/ 这篇文章,对于async await (); var con1 = ExecutionContext.Capture(); var a = ExecutionContext.SuppressFlow var con2 = ExecutionContext.Capture(); ExecutionContext.Run(con2, s => {

    94320编辑于 2023-03-16
  • 来自专栏全栈程序员必看

    springbatch 批处理框架的介绍

    下表列出了用于的属性. 2.3.1、ExecutionContext ExecutionContext 存储这 框架需要持久化和控制的键值对集合,以便开发人员存储作用域为StepExecution Restart data is: " + executionContext); long lineCount = executionContext.getLong(getKey(LINES_READ_COUNT 很难知道是否应该使用现有的ExecutionContext。 同样重要的是要注意,在任何给定时间,每一步执行只存在一个ExecutionContextExecutionContext的客户端应该小心,因为这会创建一个共享密钥空间。 例如,考虑下面的代码片段 ExecutionContext ecStep = stepExecution.getExecutionContext(); ExecutionContext ecJob =

    1.8K10编辑于 2022-09-02
领券