-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Create project Datablock #179
- Loading branch information
Showing
7 changed files
with
244 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
datablock/src/main/java/tv/hd3g/datablock/DatablockMigrateChunkPolicy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* This file is part of datablock. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* Copyright (C) hdsdi3g for hd3g.tv 2024 | ||
* | ||
*/ | ||
package tv.hd3g.datablock; | ||
|
||
public record DatablockMigrateChunkPolicy(boolean keepActualChunk, | ||
boolean markActualChunkAsArchived, | ||
boolean markActualChunkAsDeleted) { | ||
|
||
public static DatablockMigrateChunkPolicy keepChunk() { | ||
return new DatablockMigrateChunkPolicy(true, false, false); | ||
} | ||
|
||
public static DatablockMigrateChunkPolicy dontKeepChunk() { | ||
return new DatablockMigrateChunkPolicy(false, false, false); | ||
} | ||
|
||
public static DatablockMigrateChunkPolicy keepChunkMarkActualDeleted() { | ||
return new DatablockMigrateChunkPolicy(true, false, true); | ||
} | ||
|
||
public static DatablockMigrateChunkPolicy keepChunkMarkActualArchived() { | ||
return new DatablockMigrateChunkPolicy(true, true, false); | ||
} | ||
|
||
public static DatablockMigrateChunkPolicy dontKeepChunkMarkActualDeleted() { | ||
return new DatablockMigrateChunkPolicy(false, false, true); | ||
} | ||
|
||
public static DatablockMigrateChunkPolicy dontKeepChunkMarkActualArchived() { | ||
return new DatablockMigrateChunkPolicy(false, true, false); | ||
} | ||
|
||
boolean changeActualChunk() { | ||
return markActualChunkAsArchived || markActualChunkAsDeleted; | ||
} | ||
|
||
} |
Oops, something went wrong.