デフォルトでは、Hotfsprogs クライアント操作はすべて、キーと値の両方にサーバーの読み取りおよび書き込み時に設定済みのマーシャラーを使用します。マーシャリングデータ を参照してください。DataFormat API を使用すると、リモートキャッシュをデコードし、すべての操作をカスタムデータ形式で発生させることができます。
// Existing Remote cache instance
RemoteCache<String, Pojo> remoteCache = ...
// IdentityMarshaller is a no-op marshaller
DataFormat rawKeyAndValues = DataFormat.builder().keyMarshaller(IdentityMarshaller.INSTANCE).valueMarshaller(IdentityMarshaller.INSTANCE).build();
// Will create a new instance of RemoteCache with the supplied DataFormat
RemoteCache<byte[], byte[]> rawResultsCache = remoteCache.withDataFormat(rawKeyAndValues);
// Existing Remote cache instance
RemoteCache<String, Pojo> remoteCache = ...
// IdentityMarshaller is a no-op marshaller
DataFormat rawKeyAndValues = DataFormat.builder().keyMarshaller(IdentityMarshaller.INSTANCE).valueMarshaller(IdentityMarshaller.INSTANCE).build();
// Will create a new instance of RemoteCache with the supplied DataFormat
RemoteCache<byte[], byte[]> rawResultsCache = remoteCache.withDataFormat(rawKeyAndValues);
Copy to ClipboardCopied!Toggle word wrapToggle overflow