Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datax-cloud
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄营
datax-cloud
Commits
8188e53a
Commit
8188e53a
authored
Jun 01, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0.0项目初始化
parent
9024780f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
10 deletions
+1
-10
RedisCacheConfig.java
...java/cn/datax/service/quartz/config/RedisCacheConfig.java
+1
-0
QrtzJobServiceImpl.java
...datax/service/quartz/service/impl/QrtzJobServiceImpl.java
+0
-10
No files found.
datax-modules/quartz-service-parent/quartz-service/src/main/java/cn/datax/service/quartz/config/RedisCacheConfig.java
View file @
8188e53a
...
...
@@ -27,6 +27,7 @@ public class RedisCacheConfig extends CachingConfigurerSupport {
* @return
*/
@Bean
@Override
public
KeyGenerator
keyGenerator
()
{
return
new
KeyGenerator
()
{
@Override
...
...
datax-modules/quartz-service-parent/quartz-service/src/main/java/cn/datax/service/quartz/service/impl/QrtzJobServiceImpl.java
View file @
8188e53a
...
...
@@ -9,10 +9,6 @@ import cn.datax.service.quartz.mapstruct.QrtzJobMapper;
import
cn.datax.service.quartz.dao.QrtzJobDao
;
import
cn.datax.common.base.BaseServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cache.annotation.CacheConfig
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.CachePut
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -25,7 +21,6 @@ import org.springframework.transaction.annotation.Transactional;
* @author yuwei
* @since 2020-05-14
*/
@CacheConfig
(
cacheNames
=
"data:quartz:jobs"
)
@Service
@Transactional
(
propagation
=
Propagation
.
SUPPORTS
,
readOnly
=
true
,
rollbackFor
=
Exception
.
class
)
public
class
QrtzJobServiceImpl
extends
BaseServiceImpl
<
QrtzJobDao
,
QrtzJobEntity
>
implements
QrtzJobService
{
...
...
@@ -44,7 +39,6 @@ public class QrtzJobServiceImpl extends BaseServiceImpl<QrtzJobDao, QrtzJobEntit
ScheduleUtil
.
createScheduleJob
(
qrtzJob
);
}
@CachePut
(
key
=
"#p0.id"
)
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateQrtzJob
(
QrtzJobDto
qrtzJobDto
)
{
...
...
@@ -53,14 +47,12 @@ public class QrtzJobServiceImpl extends BaseServiceImpl<QrtzJobDao, QrtzJobEntit
ScheduleUtil
.
updateScheduleJob
(
qrtzJob
);
}
@Cacheable
(
key
=
"#id"
)
@Override
public
QrtzJobEntity
getQrtzJobById
(
String
id
)
{
QrtzJobEntity
qrtzJobEntity
=
super
.
getById
(
id
);
return
qrtzJobEntity
;
}
@CacheEvict
(
key
=
"#id"
)
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteQrtzJobById
(
String
id
)
{
...
...
@@ -68,7 +60,6 @@ public class QrtzJobServiceImpl extends BaseServiceImpl<QrtzJobDao, QrtzJobEntit
qrtzJobDao
.
deleteById
(
id
);
}
@CachePut
(
key
=
"#id"
)
@Override
public
void
pauseById
(
String
id
)
{
QrtzJobEntity
job
=
getQrtzJobById
(
id
);
...
...
@@ -77,7 +68,6 @@ public class QrtzJobServiceImpl extends BaseServiceImpl<QrtzJobDao, QrtzJobEntit
ScheduleUtil
.
pauseJob
(
id
);
}
@CachePut
(
key
=
"#id"
)
@Override
public
void
resumeById
(
String
id
)
{
QrtzJobEntity
job
=
getQrtzJobById
(
id
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment