Interface JournalService
-
- All Implemented Interfaces:
public interface JournalServiceSubmit/Commit the operation with a Journal. If a Journal exists in the context, then reuse it, otherwise create a new one in the context.
- Since:
2019-06-05
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classJournalService.Journal
-
Method Summary
Modifier and Type Method Description abstract longelapse(@NotNull() JournalService.Journal journal)set and return elapse mills of the journal, can ignore error. abstract JournalService.Journalcreate(long parentId, @NotNull() String eventName, @Nullable() String loginInfo, @Nullable() String targetKey, @Nullable() String otherInfo)create new Journal without the context. abstract <R> Rsubmit(@NotNull() String eventName, @Nullable() String loginInfo, @Nullable() String targetKey, @Nullable() String otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)Submit the operation (event) with journal and return some result. JournalService.Journalcommit(@NotNull() String eventName, @Nullable() String loginInfo, @Nullable() String targetKey, @Nullable() String otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)Commit the operation (event) with journal and return the journal. JournalService.Journalcreate(long parentId, @NotNull() Class<out Object> eventClass, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo)create new Journal without the context. <R> Rsubmit(@NotNull() Class<out Object> eventClass, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)Submit the operation (event) with journal and return some result. JournalService.Journalcommit(@NotNull() Class<out Object> eventClass, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)Commit the operation (event) with journal and return the journal. JournalService.Journalcreate(long parentId, @NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @Nullable() Object otherInfo)create new Journal without the context. <R> Rsubmit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)Submit the operation (event) with journal and return some result. JournalService.Journalcommit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)Commit the operation (event) with journal and return the journal. JournalService.Journalcreate(long parentId, @NotNull() Class<out Object> eventClass, @Nullable() Object targetKey)create new Journal without the context. <R> Rsubmit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @NotNull() Function<JournalService.Journal, R> commitSet)Submit the operation (event) with journal and return some result. JournalService.Journalcommit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @NotNull() Consumer<JournalService.Journal> commitSet)Commit the operation (event) with journal and return the journal. JournalService.Journalcreate(long parentId, @NotNull() Class<out Object> eventClass)create new Journal without the context. <R> Rsubmit(@NotNull() Class<out Object> eventClass, @NotNull() Function<JournalService.Journal, R> commitSet)Submit the operation (event) with journal and return some result. JournalService.Journalcommit(@NotNull() Class<out Object> eventClass, @NotNull() Consumer<JournalService.Journal> commitSet)Commit the operation (event) with journal and return the journal. JournalService.Journalcreate(long parentId, @NotNull() Enum<out Object> eventEnum, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo)create new Journal without the context. <R> Rsubmit(@NotNull() Enum<out Object> eventEnum, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)Submit the operation (event) with journal and return some result. JournalService.Journalcommit(@NotNull() Enum<out Object> eventEnum, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)Commit the operation (event) with journal and return the journal. JournalService.Journalcreate(long parentId, @NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @Nullable() Object otherInfo)create new Journal without the context. <R> Rsubmit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)Submit the operation (event) with journal and return some result. JournalService.Journalcommit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)Commit the operation (event) with journal and return the journal. JournalService.Journalcreate(long parentId, @NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey)create new Journal without the context. <R> Rsubmit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @NotNull() Function<JournalService.Journal, R> commitSet)Submit the operation (event) with journal and return some result. JournalService.Journalcommit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @NotNull() Consumer<JournalService.Journal> commitSet)Commit the operation (event) with journal and return the journal. JournalService.Journalcreate(long parentId, @NotNull() Enum<out Object> eventEnum)create new Journal without the context. <R> Rsubmit(@NotNull() Enum<out Object> eventEnum, @NotNull() Function<JournalService.Journal, R> commitSet)Submit the operation (event) with journal and return some result. JournalService.Journalcommit(@NotNull() Enum<out Object> eventEnum, @NotNull() Consumer<JournalService.Journal> commitSet)Commit the operation (event) with journal and return the journal. -
-
Method Detail
-
elapse
abstract long elapse(@NotNull() JournalService.Journal journal)
set and return elapse mills of the journal, can ignore error. SHOULD use the default connection without an explicit transaction. NOTE: submit/commit auto elapse, but create not.
-
create
@NotNull() abstract JournalService.Journal create(long parentId, @NotNull() String eventName, @Nullable() String loginInfo, @Nullable() String targetKey, @Nullable() String otherInfo)
create new Journal without the context. SHOULD create journal in REQUIRES_NEW.
- Parameters:
parentId- parent id, default 0;eventName- event nameloginInfo- login info ,eg.targetKey- key/id of targetotherInfo- other info of operation- Returns:
Journal without the context
-
submit
@NotNull() abstract <R> R submit(@NotNull() String eventName, @Nullable() String loginInfo, @Nullable() String targetKey, @Nullable() String otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)
Submit the operation (event) with journal and return some result. SHOULD create journal in REQUIRES_NEW, but not affect commitSet
- Parameters:
eventName- event nameloginInfo- login info ,eg.targetKey- key/id of targetotherInfo- other info of operationcommitSet- operations- Returns:
the result
-
commit
@NotNull() JournalService.Journal commit(@NotNull() String eventName, @Nullable() String loginInfo, @Nullable() String targetKey, @Nullable() String otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)
Commit the operation (event) with journal and return the journal. SHOULD create journal in REQUIRES_NEW, but not affect commitSet
- Parameters:
eventName- event nameloginInfo- login info ,eg.targetKey- key/id of targetotherInfo- other info of operationcommitSet- operations- Returns:
the journal
-
create
@NotNull() JournalService.Journal create(long parentId, @NotNull() Class<out Object> eventClass, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo)
create new Journal without the context. SHOULD create journal in REQUIRES_NEW.
- Parameters:
parentId- parent id, default 0;eventClass- use Class.loginInfo- login info ,eg.targetKey- key/id of targetotherInfo- other info of operation- Returns:
Journal without the context
-
submit
@NotNull() <R> R submit(@NotNull() Class<out Object> eventClass, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)
Submit the operation (event) with journal and return some result. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to create targetKey/OtherInfo in Json
- Parameters:
eventClass- use Class.loginInfo- login info ,eg.targetKey- key/id of targetotherInfo- other info of operationcommitSet- operations- Returns:
the result
-
commit
@NotNull() JournalService.Journal commit(@NotNull() Class<out Object> eventClass, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)
Commit the operation (event) with journal and return the journal. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to create targetKey/OtherInfo in Json
- Parameters:
eventClass- use Class.loginInfo- login info ,eg.targetKey- key/id of targetotherInfo- other info of operationcommitSet- operations- Returns:
the journal
-
create
@NotNull() JournalService.Journal create(long parentId, @NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @Nullable() Object otherInfo)
create new Journal without the context. SHOULD create journal in REQUIRES_NEW.
- Parameters:
parentId- parent id, default 0;eventClass- use Class.targetKey- key/id of targetotherInfo- other info of operation- Returns:
Journal without the context
-
submit
@NotNull() <R> R submit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)
Submit the operation (event) with journal and return some result. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventClass- use Class.targetKey- key/id of targetotherInfo- other info of operationcommitSet- operations- Returns:
the result
-
commit
@NotNull() JournalService.Journal commit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)
Commit the operation (event) with journal and return the journal. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventClass- use Class.targetKey- key/id of targetotherInfo- other info of operationcommitSet- operations- Returns:
the journal
-
create
@NotNull() JournalService.Journal create(long parentId, @NotNull() Class<out Object> eventClass, @Nullable() Object targetKey)
create new Journal without the context. SHOULD create journal in REQUIRES_NEW.
- Parameters:
parentId- parent id, default 0;eventClass- use Class.targetKey- key/id of target- Returns:
Journal without the context
-
submit
@NotNull() <R> R submit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @NotNull() Function<JournalService.Journal, R> commitSet)
Submit the operation (event) with journal and return some result. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventClass- use Class.targetKey- key/id of targetcommitSet- operations- Returns:
the result
-
commit
@NotNull() JournalService.Journal commit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @NotNull() Consumer<JournalService.Journal> commitSet)
Commit the operation (event) with journal and return the journal. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventClass- use Class.targetKey- key/id of targetcommitSet- operations- Returns:
the journal
-
create
@NotNull() JournalService.Journal create(long parentId, @NotNull() Class<out Object> eventClass)
create new Journal without the context. SHOULD create journal in REQUIRES_NEW.
- Parameters:
parentId- parent id, default 0;eventClass- use Class.- Returns:
Journal without the context
-
submit
@NotNull() <R> R submit(@NotNull() Class<out Object> eventClass, @NotNull() Function<JournalService.Journal, R> commitSet)
Submit the operation (event) with journal and return some result. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventClass- use Class.commitSet- operations- Returns:
the result
-
commit
@NotNull() JournalService.Journal commit(@NotNull() Class<out Object> eventClass, @NotNull() Consumer<JournalService.Journal> commitSet)
Commit the operation (event) with journal and return the journal. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventClass- use Class.commitSet- operations- Returns:
the journal
-
create
@NotNull() JournalService.Journal create(long parentId, @NotNull() Enum<out Object> eventEnum, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo)
create new Journal without the context. SHOULD create journal in REQUIRES_NEW.
- Parameters:
parentId- parent id, default 0;eventEnum- convert enum with EnumConvertorloginInfo- login info ,eg.targetKey- key/id of targetotherInfo- other info of operation- Returns:
Journal without the context
-
submit
@NotNull() <R> R submit(@NotNull() Enum<out Object> eventEnum, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)
Submit the operation (event) with journal and return some result. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to create targetKey/OtherInfo in Json
- Parameters:
eventEnum- convert enum with EnumConvertorloginInfo- login info ,eg.targetKey- key/id of targetotherInfo- other info of operationcommitSet- operations- Returns:
the result
-
commit
@NotNull() JournalService.Journal commit(@NotNull() Enum<out Object> eventEnum, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)
Commit the operation (event) with journal and return the journal. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to create targetKey/OtherInfo in Json
- Parameters:
eventEnum- convert enum with EnumConvertorloginInfo- login info ,eg.targetKey- key/id of targetotherInfo- other info of operationcommitSet- operations- Returns:
the journal
-
create
@NotNull() JournalService.Journal create(long parentId, @NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @Nullable() Object otherInfo)
create new Journal without the context. SHOULD create journal in REQUIRES_NEW.
- Parameters:
parentId- parent id, default 0;eventEnum- convert enum with EnumConvertortargetKey- key/id of targetotherInfo- other info of operation- Returns:
Journal without the context
-
submit
@NotNull() <R> R submit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)
Submit the operation (event) with journal and return some result. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventEnum- convert enum with EnumConvertortargetKey- key/id of targetotherInfo- other info of operationcommitSet- operations- Returns:
the result
-
commit
@NotNull() JournalService.Journal commit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)
Commit the operation (event) with journal and return the journal. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventEnum- convert enum with EnumConvertortargetKey- key/id of targetotherInfo- other info of operationcommitSet- operations- Returns:
the journal
-
create
@NotNull() JournalService.Journal create(long parentId, @NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey)
create new Journal without the context. SHOULD create journal in REQUIRES_NEW.
- Parameters:
parentId- parent id, default 0;eventEnum- convert enum with EnumConvertortargetKey- key/id of target- Returns:
Journal without the context
-
submit
@NotNull() <R> R submit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @NotNull() Function<JournalService.Journal, R> commitSet)
Submit the operation (event) with journal and return some result. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventEnum- convert enum with EnumConvertortargetKey- key/id of targetcommitSet- operations- Returns:
the result
-
commit
@NotNull() JournalService.Journal commit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @NotNull() Consumer<JournalService.Journal> commitSet)
Commit the operation (event) with journal and return the journal. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventEnum- convert enum with EnumConvertortargetKey- key/id of targetcommitSet- operations- Returns:
the journal
-
create
@NotNull() JournalService.Journal create(long parentId, @NotNull() Enum<out Object> eventEnum)
create new Journal without the context. SHOULD create journal in REQUIRES_NEW.
- Parameters:
parentId- parent id, default 0;eventEnum- convert enum with EnumConvertor- Returns:
Journal without the context
-
submit
@NotNull() <R> R submit(@NotNull() Enum<out Object> eventEnum, @NotNull() Function<JournalService.Journal, R> commitSet)
Submit the operation (event) with journal and return some result. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventEnum- convert enum with EnumConvertorcommitSet- operations- Returns:
the result
-
commit
@NotNull() JournalService.Journal commit(@NotNull() Enum<out Object> eventEnum, @NotNull() Consumer<JournalService.Journal> commitSet)
Commit the operation (event) with journal and return the journal. SHOULD create journal in REQUIRES_NEW, but not affect commitSet It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext
- Parameters:
eventEnum- convert enum with EnumConvertorcommitSet- operations- Returns:
the journal
-
-
-
-