Search in sources :

Example 1 with Builder

use of com.alipay.sofa.jraft.entity.LocalFileMetaOutter.LocalFileMeta.Builder in project sofa-jraft by sofastack.

the class LocalSnapshotWriter method addFile.

@Override
public boolean addFile(final String fileName, final Message fileMeta) {
    final Builder metaBuilder = LocalFileMeta.newBuilder();
    if (fileMeta != null) {
        metaBuilder.mergeFrom(fileMeta);
    }
    final LocalFileMeta meta = metaBuilder.build();
    return this.metaTable.addFile(fileName, meta);
}
Also used : Builder(com.alipay.sofa.jraft.entity.LocalFileMetaOutter.LocalFileMeta.Builder) LocalFileMeta(com.alipay.sofa.jraft.entity.LocalFileMetaOutter.LocalFileMeta)

Aggregations

LocalFileMeta (com.alipay.sofa.jraft.entity.LocalFileMetaOutter.LocalFileMeta)1 Builder (com.alipay.sofa.jraft.entity.LocalFileMetaOutter.LocalFileMeta.Builder)1