private static DataTransferProtos.CachingStrategyProto GetCachingStrategy(CachingStrategy cachingStrategy) { DataTransferProtos.CachingStrategyProto.Builder builder = DataTransferProtos.CachingStrategyProto .NewBuilder(); if (cachingStrategy.GetReadahead() != null) { builder.SetReadahead(cachingStrategy.GetReadahead()); } if (cachingStrategy.GetDropBehind() != null) { builder.SetDropBehind(cachingStrategy.GetDropBehind()); } return((DataTransferProtos.CachingStrategyProto)builder.Build()); }