public interface WriteObject
Modifier and Type | Method and Description |
---|---|
default StreamWriter<List<?>,WriteOk> |
objectsStreamWriter() |
default StreamWriter<List<?>,WriteOk> |
objectsStreamWriter(int maxPointsPerSecond) |
StreamWriter<List<?>,WriteOk> |
objectsStreamWriter(int maxPointsPerSecond,
Context ctx)
Create a `Stream` to continuously write data to the database, typically used in data import
scenarios.
|
default CompletableFuture<Result<WriteOk,Err>> |
writeObjects(Collection<List<?>> objects) |
default CompletableFuture<Result<WriteOk,Err>> |
writeObjects(Collection<List<?>> objects,
WriteOp writeOp) |
CompletableFuture<Result<WriteOk,Err>> |
writeObjects(Collection<List<?>> objects,
WriteOp writeOp,
Context ctx)
Write multiple rows of data (which can belong to multiple tables) to the database at once.
|
default CompletableFuture<Result<WriteOk,Err>> |
writeObjects(List<?>... objects) |
default CompletableFuture<Result<WriteOk,Err>> writeObjects(List<?>... objects)
objects
- the objects to writewriteObjects(Collection, WriteOp, Context)
default CompletableFuture<Result<WriteOk,Err>> writeObjects(Collection<List<?>> objects)
objects
- the objects to writewriteObjects(Collection, WriteOp, Context)
default CompletableFuture<Result<WriteOk,Err>> writeObjects(Collection<List<?>> objects, WriteOp writeOp)
objects
- the objects to writewriteOp
- the write operationwriteObjects(Collection, WriteOp, Context)
CompletableFuture<Result<WriteOk,Err>> writeObjects(Collection<List<?>> objects, WriteOp writeOp, Context ctx)
objects
- a collection of data to be written, classified by tablewriteOp
- write operation(insert or delete)ctx
- invoke contextdefault StreamWriter<List<?>,WriteOk> objectsStreamWriter()
objectsStreamWriter(int, Context)
default StreamWriter<List<?>,WriteOk> objectsStreamWriter(int maxPointsPerSecond)
maxPointsPerSecond
- the max number of points that can be written per second, exceeding which may cause blockageobjectsStreamWriter(int, Context)
StreamWriter<List<?>,WriteOk> objectsStreamWriter(int maxPointsPerSecond, Context ctx)
It is important to note that each write operation can write a List of POJOs. However, the POJO objects in the List must have the same type. If you need to write different types of POJO objects, you can perform multiple write operations on the `Stream`, dividing them into separate writes when you obtain the `Stream`.
maxPointsPerSecond
- The max number of points that can be written per second,
exceeding which may cause blockage.ctx
- invoke contextCopyright © 2025. All rights reserved.