-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
707d17d
commit 9e94d41
Showing
10 changed files
with
88 additions
and
72 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
18 changes: 18 additions & 0 deletions
18
...-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/file/FileContent.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,18 @@ | ||
package com.jd.live.agent.core.service.file; | ||
|
||
import lombok.Getter; | ||
|
||
/** | ||
* Inner class representing the content of a file including its last modified timestamp, | ||
* the bytes of its content, and the CRC32 digest of the content. | ||
*/ | ||
@Getter | ||
public class FileContent extends FileDigest { | ||
|
||
private final byte[] bytes; | ||
|
||
public FileContent(long lastModified, long crc32, byte[] bytes) { | ||
super(lastModified, crc32); | ||
this.bytes = bytes; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...e-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/file/FileDigest.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,21 @@ | ||
package com.jd.live.agent.core.service.file; | ||
|
||
import lombok.Getter; | ||
|
||
/** | ||
* Inner class representing a digest of a file, which includes the last modified timestamp | ||
* and the CRC32 digest of the file's content. | ||
*/ | ||
@Getter | ||
public class FileDigest { | ||
|
||
protected final long lastModified; | ||
|
||
protected final long crc32; | ||
|
||
public FileDigest(long lastModified, long crc32) { | ||
this.lastModified = lastModified; | ||
this.crc32 = crc32; | ||
} | ||
|
||
} |
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