热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.jgroups.JChannel.startFlush()方法的使用及代码示例

本文整理了Java中org.jgroups.JChannel.startFlush()方法的一些代码示例,展示了JChannel.startFlush()

本文整理了Java中org.jgroups.JChannel.startFlush()方法的一些代码示例,展示了JChannel.startFlush()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JChannel.startFlush()方法的具体详情如下:
包路径:org.jgroups.JChannel
类名称:JChannel
方法名:startFlush

JChannel.startFlush介绍

[英]Will perform a flush of the system, ie. all pending messages are flushed out of the system and all members ack their reception. After this call returns, no member will be sending any messages until #stopFlush() is called.

In case of flush collisions, random sleep time backoff algorithm is employed and flush is reattempted for numberOfAttempts. Therefore this method is guaranteed to return after timeout x numberOfAttempts miliseconds.
[中]将执行系统刷新,即所有待处理的消息都将刷新出系统,所有成员都将确认其接收。此调用返回后,在调用#stopFlush()之前,任何成员都不会发送任何消息。
在刷新冲突的情况下,使用随机睡眠时间退避算法,并重新尝试刷新次数。因此,该方法保证在超时x numberoft毫秒后返回。

代码示例

代码示例来源:origin: wildfly/wildfly

/**
* Performs the flush of the cluster but only for the specified flush participants.
*


* All pending messages are flushed out but only for the flush participants. The remaining
* members in the cluster are not included in the flush. The list of flush participants should be
* a proper subset of the current view.
*


* If this flush is not automatically resumed it is an obligation of the application to invoke
* the matching {@link #stopFlush(List)} method with the same list of members used in
* {@link #startFlush(List, boolean)}.
*
* @param automatic_resume
* if true call {@link #stopFlush()} after the flush
* @see #startFlush(boolean)
* @see Util#startFlush(Channel, List, int, long, long)
*/
public void startFlush(List

flushParticipants, boolean automatic_resume) throws Exception {
ch.startFlush(flushParticipants, automatic_resume);
}

代码示例来源:origin: wildfly/wildfly

/**
* Performs the flush of the cluster, ie. all pending application messages are flushed out of the cluster and
* all members ack their reception. After this call returns, no member will be allowed to send any
* messages until {@link #stopFlush()} is called.
*


* In the case of flush collisions (another member attempts flush at roughly the same time) start flush will
* fail by throwing an Exception. Applications can re-attempt flushing after certain back-off period.
*


* JGroups provides a helper random sleep time backoff algorithm for flush using Util class.
*
* @param automatic_resume
* if true call {@link #stopFlush()} after the flush
*
* @see Util#startFlush(Channel, List, int, long, long)
*/
public void startFlush(boolean automatic_resume) throws Exception {
ch.startFlush(automatic_resume);
}

代码示例来源:origin: wildfly/wildfly

/**
* Performs the flush of the given channel within the specfied number of attempts along with random
* sleep time after each such attempt.
* @param c the channel
* @param numberOfAttempts the number of flush attempts
* @param randomSleepTimeoutFloor the minimum sleep time between attempts in ms
* @param randomSleepTimeoutCeiling the maximum sleep time between attempts in ms
* @return true if channel was flushed successfully, false otherwise
* @see JChannel#startFlush(boolean)
*/
public static boolean startFlush(JChannel c,int numberOfAttempts,long randomSleepTimeoutFloor,long randomSleepTimeoutCeiling) {
int attemptCount=0;
while(attemptCount try {
c.startFlush(false);
return true;
}
catch(Exception e) {
Util.sleepRandom(randomSleepTimeoutFloor,randomSleepTimeoutCeiling);
attemptCount++;
}
}
return false;
}

代码示例来源:origin: wildfly/wildfly

/**
* Performs the flush of the given channel for the specified flush participants and the given
* number of attempts along with random sleep time after each such attempt.
* @param c the channel
* @param flushParticipants the flush participants in this flush attempt
* @param numberOfAttempts the number of flush attempts
* @param randomSleepTimeoutFloor the minimum sleep time between attempts in ms
* @param randomSleepTimeoutCeiling the maximum sleep time between attempts in ms
* @return true if channel was flushed successfully, false otherwise
* @see JChannel#startFlush(List,boolean)
*/
public static boolean startFlush(JChannel c,List

flushParticipants,
int numberOfAttempts,long randomSleepTimeoutFloor,long randomSleepTimeoutCeiling) {
int attemptCount=0;
while(attemptCount try {
c.startFlush(flushParticipants,false);
return true;
}
catch(Exception e) {
Util.sleepRandom(randomSleepTimeoutFloor,randomSleepTimeoutCeiling);
attemptCount++;
}
}
return false;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
* Performs the flush of the cluster, ie. all pending application messages are flushed out of the cluster and
* all members ack their reception. After this call returns, no member will be allowed to send any
* messages until {@link #stopFlush()} is called.
*


* In the case of flush collisions (another member attempts flush at roughly the same time) start flush will
* fail by throwing an Exception. Applications can re-attempt flushing after certain back-off period.
*


* JGroups provides a helper random sleep time backoff algorithm for flush using Util class.
*
* @param automatic_resume
* if true call {@link #stopFlush()} after the flush
*
* @see Util#startFlush(Channel, List, int, long, long)
*/
public void startFlush(boolean automatic_resume) throws Exception {
ch.startFlush(automatic_resume);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
* Performs the flush of the cluster but only for the specified flush participants.
*


* All pending messages are flushed out but only for the flush participants. The remaining
* members in the cluster are not included in the flush. The list of flush participants should be
* a proper subset of the current view.
*


* If this flush is not automatically resumed it is an obligation of the application to invoke
* the matching {@link #stopFlush(List)} method with the same list of members used in
* {@link #startFlush(List, boolean)}.
*
* @param automatic_resume
* if true call {@link #stopFlush()} after the flush
* @see #startFlush(boolean)
* @see Util#startFlush(Channel, List, int, long, long)
*/
public void startFlush(List

flushParticipants, boolean automatic_resume) throws Exception {
ch.startFlush(flushParticipants, automatic_resume);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
* Performs the flush of the given channel within the specfied number of attempts along with random
* sleep time after each such attempt.
* @param c the channel
* @param numberOfAttempts the number of flush attempts
* @param randomSleepTimeoutFloor the minimum sleep time between attempts in ms
* @param randomSleepTimeoutCeiling the maximum sleep time between attempts in ms
* @return true if channel was flushed successfully, false otherwise
* @see JChannel#startFlush(boolean)
*/
public static boolean startFlush(JChannel c,int numberOfAttempts,long randomSleepTimeoutFloor,long randomSleepTimeoutCeiling) {
int attemptCount=0;
while(attemptCount try {
c.startFlush(false);
return true;
}
catch(Exception e) {
Util.sleepRandom(randomSleepTimeoutFloor,randomSleepTimeoutCeiling);
attemptCount++;
}
}
return false;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
* Performs the flush of the given channel for the specified flush participants and the given
* number of attempts along with random sleep time after each such attempt.
* @param c the channel
* @param flushParticipants the flush participants in this flush attempt
* @param numberOfAttempts the number of flush attempts
* @param randomSleepTimeoutFloor the minimum sleep time between attempts in ms
* @param randomSleepTimeoutCeiling the maximum sleep time between attempts in ms
* @return true if channel was flushed successfully, false otherwise
* @see JChannel#startFlush(List,boolean)
*/
public static boolean startFlush(JChannel c,List

flushParticipants,
int numberOfAttempts,long randomSleepTimeoutFloor,long randomSleepTimeoutCeiling) {
int attemptCount=0;
while(attemptCount try {
c.startFlush(flushParticipants,false);
return true;
}
catch(Exception e) {
Util.sleepRandom(randomSleepTimeoutFloor,randomSleepTimeoutCeiling);
attemptCount++;
}
}
return false;
}

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

try {
if(entry.channel.flushSupported()){
boolean successfulFlush = entry.channel.startFlush(3000, false);
if(!successfulFlush && log.isWarnEnabled()){
log.warn("Flush failed at " + ch.getLocalAddress() + ch.getId());

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

try {
if(entry.channel.flushSupported()){
boolean successfulFlush = entry.channel.startFlush(3000, false);
if(!successfulFlush && log.isWarnEnabled()){
log.warn("Flush failed at " + ch.getLocalAddress() + ch.getId());

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

try {
if(entry.channel.flushSupported()){
boolean successfulFlush = entry.channel.startFlush(3000, false);
if(!successfulFlush && log.isWarnEnabled()){
log.warn("Flush failed at " + ch.getLocalAddress() + ch.getId());

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

Address addr=entry.channel.getLocalAddress();
if(entry.channel.flushSupported()){
boolean successfulFlush = entry.channel.startFlush(3000, false);
if(!successfulFlush && log.isWarnEnabled()){
log.warn("Flush failed at " + ch.getLocalAddress() + " " + ch.getId());

推荐阅读
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • 微软头条实习生分享深度学习自学指南
    本文介绍了一位微软头条实习生自学深度学习的经验分享,包括学习资源推荐、重要基础知识的学习要点等。作者强调了学好Python和数学基础的重要性,并提供了一些建议。 ... [详细]
  • vue使用
    关键词: ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • 本文讨论了使用差分约束系统求解House Man跳跃问题的思路与方法。给定一组不同高度,要求从最低点跳跃到最高点,每次跳跃的距离不超过D,并且不能改变给定的顺序。通过建立差分约束系统,将问题转化为图的建立和查询距离的问题。文章详细介绍了建立约束条件的方法,并使用SPFA算法判环并输出结果。同时还讨论了建边方向和跳跃顺序的关系。 ... [详细]
  • Python正则表达式学习记录及常用方法
    本文记录了学习Python正则表达式的过程,介绍了re模块的常用方法re.search,并解释了rawstring的作用。正则表达式是一种方便检查字符串匹配模式的工具,通过本文的学习可以掌握Python中使用正则表达式的基本方法。 ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • 如何自行分析定位SAP BSP错误
    The“BSPtag”Imentionedintheblogtitlemeansforexamplethetagchtmlb:configCelleratorbelowwhichi ... [详细]
  • 云原生边缘计算之KubeEdge简介及功能特点
    本文介绍了云原生边缘计算中的KubeEdge系统,该系统是一个开源系统,用于将容器化应用程序编排功能扩展到Edge的主机。它基于Kubernetes构建,并为网络应用程序提供基础架构支持。同时,KubeEdge具有离线模式、基于Kubernetes的节点、群集、应用程序和设备管理、资源优化等特点。此外,KubeEdge还支持跨平台工作,在私有、公共和混合云中都可以运行。同时,KubeEdge还提供数据管理和数据分析管道引擎的支持。最后,本文还介绍了KubeEdge系统生成证书的方法。 ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • HDU 2372 El Dorado(DP)的最长上升子序列长度求解方法
    本文介绍了解决HDU 2372 El Dorado问题的一种动态规划方法,通过循环k的方式求解最长上升子序列的长度。具体实现过程包括初始化dp数组、读取数列、计算最长上升子序列长度等步骤。 ... [详细]
  • [译]技术公司十年经验的职场生涯回顾
    本文是一位在技术公司工作十年的职场人士对自己职业生涯的总结回顾。她的职业规划与众不同,令人深思又有趣。其中涉及到的内容有机器学习、创新创业以及引用了女性主义者在TED演讲中的部分讲义。文章表达了对职业生涯的愿望和希望,认为人类有能力不断改善自己。 ... [详细]
  • 拥抱Android Design Support Library新变化(导航视图、悬浮ActionBar)
    转载请注明明桑AndroidAndroid5.0Loollipop作为Android最重要的版本之一,为我们带来了全新的界面风格和设计语言。看起来很受欢迎࿰ ... [详细]
  • 本文介绍了UVALive6575题目Odd and Even Zeroes的解法,使用了数位dp和找规律的方法。阶乘的定义和性质被介绍,并给出了一些例子。其中,部分阶乘的尾零个数为奇数,部分为偶数。 ... [详细]
  • Linux环境变量函数getenv、putenv、setenv和unsetenv详解
    本文详细解释了Linux中的环境变量函数getenv、putenv、setenv和unsetenv的用法和功能。通过使用这些函数,可以获取、设置和删除环境变量的值。同时给出了相应的函数原型、参数说明和返回值。通过示例代码演示了如何使用getenv函数获取环境变量的值,并打印出来。 ... [详细]
author-avatar
夏石兵
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有