Skip to content

Commit 84f254d

Browse files
committed
+ Chunk no longer implements Serializable
1 parent 46220de commit 84f254d

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,7 @@ in the same group representing the original data unit.
9292
#### API:
9393

9494
```java
95-
public class Chunk implements Serializable {
96-
97-
private static final long serialVersionUID = 42L;
98-
95+
public class Chunk {
9996
/**
10097
* The group ID of the original data blob. All chunks in the same group share the same group ID.
10198
*/
@@ -123,10 +120,12 @@ public class Chunk implements Serializable {
123120
#### Usage example:
124121

125122
Chunk4J aims to handle most details of the `Chunk` behind the scenes of the `Chopper` and `Stitcher` API. For the API
126-
client, it suffices to know that `Chunk` is a simple POJO data holder; serializable, it carries the data bytes
127-
travelling from the `Chopper` to the `Stitcher`. To transport Chunks over the network, the API client simply needs to
128-
pack the Chunk into a transport-specific message on the Chopper's end, and unpack the message back to a Chunk on the
129-
Stitcher's end, using the POJO marshal-unmarshal technique applicable to the transport.
123+
client, it suffices to know that `Chunk` is a simple POJO data holder, carrying a portion of the original data bytes
124+
from the `Chopper` to the `Stitcher`. To transport Chunks over the network, the API client simply needs to pack the
125+
Chunk into a transport-specific message on the Chopper's end, and unpack the message back to a Chunk on the Stitcher's
126+
end, using the marshaling(serialize)-unmarshalling(deserialize) technique applicable to that transport for a POJO. Note
127+
that `Chunk` does not implement `java.io.Serializable`, with the expectation that the external data transport, rather
128+
than the JVM, will take care of the serialization/deserialization.
130129

131130
### The Stitcher
132131

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<modelVersion>4.0.0</modelVersion>
2929
<groupId>io.github.q3769</groupId>
3030
<artifactId>chunk4j</artifactId>
31-
<version>20230309.0.20230608</version>
31+
<version>20230621.0.0</version>
3232
<packaging>jar</packaging>
3333
<name>chunk4j</name>
3434
<description>A Java API to chop up larger data blobs into smaller "chunks" of a pre-defined size, and stitch the

src/main/java/chunk4j/Chunk.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import lombok.ToString;
3030
import lombok.Value;
3131

32-
import java.io.Serializable;
3332
import java.util.UUID;
3433

3534
/**
@@ -42,9 +41,7 @@
4241
@Value
4342
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
4443
@Builder
45-
public class Chunk implements Serializable {
46-
47-
private static final long serialVersionUID = 42L;
44+
public class Chunk {
4845

4946
/**
5047
* The group ID of the original data blob. All chunks in the same group share the same group ID.

0 commit comments

Comments
 (0)