/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; namespace Avro.File { public interface IFileWriter : IDisposable { /// /// Append datum to a file / stream /// /// void Append(T datum); /// /// Closes the file / stream /// void Close(); /// /// Flush out any buffered data /// void Flush(); /// Returns true if parameter is a /// reserved Avro meta data value /// /// /// bool IsReservedMeta(string key); /// /// Set meta data pair /// /// /// void SetMeta(String key, byte[] value); /// /// Set meta data pair (long value) /// /// /// void SetMeta(String key, long value); /// /// Set meta data pair (string value) /// /// /// void SetMeta(String key, string value); /// /// Set the synchronization interval for this /// file / stream, in bytes. Valid values range /// from 32 to 2^30. Suggested values are /// between 2K and 2M /// /// /// void SetSyncInterval(int syncInterval); /// /// Forces the end of the current block, /// emitting a synchronization marker /// /// long Sync(); } }