Java 内存中的对象图序列化

Java 内存中的对象图序列化,java,Java,假设我将此对象实例化为一个示例: BasicAWSCredentials凭证= 新的基本凭证(objectStoreAccessKey、objectStoreSecretKey); AmazonS3 s3client=AmazonS3ClientBuilder .standard() .具有凭证(新AWSStaticCredentialsProvider(凭证)) .withEndpointConfiguration( 新的AwsClientBuilder.EndpointConfigurati

假设我将此对象实例化为一个示例:

BasicAWSCredentials凭证=
新的基本凭证(objectStoreAccessKey、objectStoreSecretKey);
AmazonS3 s3client=AmazonS3ClientBuilder
.standard()
.具有凭证(新AWSStaticCredentialsProvider(凭证))
.withEndpointConfiguration(
新的AwsClientBuilder.EndpointConfiguration(objectStoreEndpoint,objectStoreRegion))
.build();
AmazonS3本身是不可序列化的(以及其他类似的客户端),是否有办法将其完整的对象图序列化,这样它就可以跨应用程序和/或其他进程的不同实例使用。

这是JVM几乎不可能做到的事情之一,据我所知,只有Terracotta能够实现它,但它不是开源的,我不知道任何开源代码有什么相似之处。