Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
街头小贩
Jforum2
提交
6d36bf68
J
Jforum2
项目概览
街头小贩
/
Jforum2
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
Jforum2
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6d36bf68
编写于
8月 16, 2020
作者:
街头小贩
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
不再使用CubbyHoleLinkedDeque,处理线程存在因异常而中止工作
上级
69eff3a0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
16 deletion
+16
-16
core.impl/src/main/java/com/apobates/forum/core/impl/CoreAppConfig.java
...main/java/com/apobates/forum/core/impl/CoreAppConfig.java
+2
-6
core.impl/src/main/java/com/apobates/forum/core/impl/CoreModuleActionEventAspect.java
...apobates/forum/core/impl/CoreModuleActionEventAspect.java
+11
-7
utils/src/main/java/com/apobates/forum/utils/lang/BiPredicateFunction.java
...va/com/apobates/forum/utils/lang/BiPredicateFunction.java
+1
-1
utils/src/main/java/com/apobates/forum/utils/lang/PredicateFunction.java
...java/com/apobates/forum/utils/lang/PredicateFunction.java
+1
-1
utils/src/main/java/com/apobates/forum/utils/lang/TriPredicateFunction.java
...a/com/apobates/forum/utils/lang/TriPredicateFunction.java
+1
-1
未找到文件。
core.impl/src/main/java/com/apobates/forum/core/impl/CoreAppConfig.java
浏览文件 @
6d36bf68
package
com.apobates.forum.core.impl
;
import
com.apobates.forum.core.entity.ActionEventDescriptor
;
import
com.apobates.forum.utils.cache.AbstractCubbyHole
;
import
com.apobates.forum.utils.cache.CubbyHoleLinkedDeque
;
import
com.apobates.forum.utils.cache.CubbyHoleProcessor
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
...
...
@@ -26,7 +22,7 @@ public class CoreAppConfig {
public
CoreModuleActionEventAspect
buildCmae
()
{
return
new
com
.
apobates
.
forum
.
core
.
impl
.
CoreModuleActionEventAspect
();
}
/*
@Bean
public CubbyHoleProcessor<ActionEventDescriptor> getCubbyHoleProcessor(){
return new ActionEventCubbyHoleProcessor();
...
...
@@ -35,5 +31,5 @@ public class CoreAppConfig {
@Bean("cubbyHole")
public AbstractCubbyHole<ActionEventDescriptor> getCubbyHole(CubbyHoleProcessor<ActionEventDescriptor> cubbyHoleProcessor){
return new CubbyHoleLinkedDeque<>(cubbyHoleProcessor);
}
}
*/
}
\ No newline at end of file
core.impl/src/main/java/com/apobates/forum/core/impl/CoreModuleActionEventAspect.java
浏览文件 @
6d36bf68
package
com.apobates.forum.core.impl
;
import
com.apobates.forum.core.dao.BoardActionCollectionDao
;
import
com.apobates.forum.core.dao.BoardDao
;
import
com.apobates.forum.core.dao.PostsDao
;
import
com.apobates.forum.core.dao.TopicActionCollectionDao
;
import
com.apobates.forum.core.dao.TopicDao
;
import
com.apobates.forum.core.entity.ActionEventDescriptor
;
import
com.apobates.forum.core.entity.Board
;
import
com.apobates.forum.core.entity.BoardActionCollection
;
import
com.apobates.forum.core.entity.Posts
;
...
...
@@ -11,7 +12,6 @@ import com.apobates.forum.core.entity.Topic;
import
com.apobates.forum.core.entity.TopicActionCollection
;
import
com.apobates.forum.event.elderly.ActionEventCulpritor
;
import
com.apobates.forum.event.elderly.ForumActionEnum
;
import
com.apobates.forum.utils.cache.AbstractCubbyHole
;
import
java.util.Optional
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.annotation.AfterReturning
;
...
...
@@ -35,8 +35,12 @@ public class CoreModuleActionEventAspect {
private
TopicDao
topicDao
;
@Autowired
private
PostsDao
postsDao
;
//@Autowired
//private AbstractCubbyHole<ActionEventDescriptor> cubbyHole;
@Autowired
private
AbstractCubbyHole
<
ActionEventDescriptor
>
cubbyHole
;
private
BoardActionCollectionDao
boardActionCollectionDao
;
@Autowired
private
TopicActionCollectionDao
topicActionCollectionDao
;
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
CoreModuleActionEventAspect
.
class
);
@Before
(
"execution(* com.apobates.forum.core.impl.service.*.*(..)) && @annotation(actionDescriptor)"
)
...
...
@@ -104,8 +108,8 @@ public class CoreModuleActionEventAspect {
}
else
{
entity
=
buildTopicAction
(
id
,
culpritor
,
actionDescriptor
);
}
//
topicActionCollectionDao.save(entity);
cubbyHole
.
put
(
entity
);
topicActionCollectionDao
.
save
(
entity
);
//
cubbyHole.put(entity);
}
private
TopicActionCollection
buildTopicAction
(
long
topicId
,
ActionEventCulpritor
culpritor
,
ActionDescriptor
actionDescriptor
){
...
...
@@ -146,8 +150,8 @@ public class CoreModuleActionEventAspect {
long
rodeMember
=
culpritor
.
getMemberId
();
logger
.
info
(
"[CAT]12>7.1 board id: "
+
board
.
getId
()+
", title: "
+
board
.
getTitle
());
BoardActionCollection
entity
=
new
BoardActionCollection
(
actionDescriptor
.
action
(),
board
.
getTitle
(),
primaryKey
,
culpritor
,
rodeMember
);
//
boardActionCollectionDao.save(entity);
cubbyHole
.
put
(
entity
);
boardActionCollectionDao
.
save
(
entity
);
//
cubbyHole.put(entity);
}
private
Long
getPrimaryKey
(
Object
[]
paramValues
,
String
[]
paramNames
,
String
keyName
)
{
...
...
utils/src/main/java/com/apobates/forum/utils/lang/BiPredicateFunction.java
浏览文件 @
6d36bf68
...
...
@@ -5,7 +5,7 @@ import org.apache.commons.lang3.tuple.ImmutablePair;
/**
* 双参数的执行函数
*
@deprecated
*
* @param <T> 条件的第一个参数类型
* @param <U> 条件的第二个参数类型
* @author xiaofanku
...
...
utils/src/main/java/com/apobates/forum/utils/lang/PredicateFunction.java
浏览文件 @
6d36bf68
...
...
@@ -4,7 +4,7 @@ import java.util.function.Predicate;
/**
* 单参数的执行函数
*
@deprecated
*
* @param <T> 条件的参数类型
* @author xiaofanku
* @since 20200805
...
...
utils/src/main/java/com/apobates/forum/utils/lang/TriPredicateFunction.java
浏览文件 @
6d36bf68
...
...
@@ -4,7 +4,7 @@ import org.apache.commons.lang3.tuple.ImmutableTriple;
/**
* 三个参数的执行函数
*
@deprecated
*
* @param <T> 条件的第一个参数类型
* @param <U> 条件的第二个参数类型
* @param <V> 条件的第三个参数类型
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录