## 接口的使用
org.hyperledger.fabric.gateway.spi.Checkpointer

- 使用Checkpointer的程序包
  程序包 | 说明
  --- | ---
  org.hyperledger.fabric.gateway | This package provides the set of interfaces that enable a Java application to interact with a Fabric blockchain network.

- - ### org.hyperledger.fabric.gateway中Checkpointer的使用

    返回Checkpointer的org.hyperledger.fabric.gateway中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `static Checkpointer` | DefaultCheckpointers.`file(Path path)` Checkpointer implementation that persists state to a given file.

    参数类型为Checkpointer的org.hyperledger.fabric.gateway中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `Consumer<org.hyperledger.fabric.sdk.BlockEvent>` | Network.`addBlockListener(Checkpointer checkpointer, Consumer<org.hyperledger.fabric.sdk.BlockEvent> listener)` Add a listener to receive block events from the network with checkpointing.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Checkpointer checkpointer, Consumer<ContractEvent> listener)` Add a listener to receive all contract events emitted by committed transactions with checkpointing.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Checkpointer checkpointer, Consumer<ContractEvent> listener, Pattern eventNamePattern)` Add a listener to receive contract events emitted by committed transactions with checkpointing.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Checkpointer checkpointer, Consumer<ContractEvent> listener, String eventName)` Add a listener to receive contract events emitted by committed transactions with checkpointing.

Copyright © 2023. All rights reserved.