Avro C#

Public Member Functions | List of all members
Avro.File.IFileWriter< T > Interface Template Reference

Defines the interface for an object that stores in a file a sequence of data conforming to a schema. More...

Inheritance diagram for Avro.File.IFileWriter< T >:

## Public Member Functions
void | Append (T datum)
| Append datum to a file or stream. More...
void | Close ()
| Closes the file or stream. More...
void | Flush ()
| Flush out any buffered data. More...
bool | IsReservedMeta (string key)
| Returns true if parameter is a reserved Avro metadata value. More...
void | SetMeta (string key, byte[] value)
| Set metadata pair. More...
void | SetMeta (string key, long value)
| Set metadata pair (long value). More...
void | SetMeta (string key, string value)
| Set metadata pair (string value). More...
void | SetSyncInterval (int syncInterval)
| Set the synchronization interval for this file or stream, in bytes. Valid values range from 32 to 2^30. Suggested values are between 2K and 2M. More...
long | Sync ()
| Forces the end of the current block, emitting a synchronization marker. More...

## Detailed Description

Defines the interface for an object that stores in a file a sequence of data conforming to a schema.

Template Parameters

  T | Type that we will serialize to the file.

## Member Function Documentation

## ◆ Append()

void Avro.File.IFileWriter< T >.Append | ( | T | datum | ) |

Append datum to a file or stream.

Parameters

  datum | Datum to append.

Implemented in Avro.File.DataFileWriter< T >.

## ◆ Close()

void Avro.File.IFileWriter< T >.Close | ( |  | ) |

Closes the file or stream.

Implemented in Avro.File.DataFileWriter< T >.

## ◆ Flush()

void Avro.File.IFileWriter< T >.Flush | ( |  | ) |

Flush out any buffered data.

Implemented in Avro.File.DataFileWriter< T >.

## ◆ IsReservedMeta()

bool Avro.File.IFileWriter< T >.IsReservedMeta | ( | string | key | ) |

Returns true if parameter is a reserved Avro metadata value.

Parameters

  key | Metadata key.

Returns
  True if parameter is a reserved Avro metadata value, false otherwise.

Implemented in Avro.File.DataFileWriter< T >.

## ◆ SetMeta() [1/3]

void Avro.File.IFileWriter< T >.SetMeta | ( | string | key,
|  | byte[] | value
| ) |  |

Set metadata pair.

Parameters

  key | Metadata key.
  value | Metadata value.

Implemented in Avro.File.DataFileWriter< T >.

## ◆ SetMeta() [2/3]

void Avro.File.IFileWriter< T >.SetMeta | ( | string | key,
|  | long | value
| ) |  |

Set metadata pair (long value).

Parameters

  key | Metadata key.
  value | Metadata value.

Implemented in Avro.File.DataFileWriter< T >.

## ◆ SetMeta() [3/3]

void Avro.File.IFileWriter< T >.SetMeta | ( | string | key,
|  | string | value
| ) |  |

Set metadata pair (string value).

Parameters

  key | Metadata key.
  value | Metadata value.

Implemented in Avro.File.DataFileWriter< T >.

## ◆ SetSyncInterval()

void Avro.File.IFileWriter< T >.SetSyncInterval | ( | int | syncInterval | ) |

Set the synchronization interval for this file or stream, in bytes. Valid values range from 32 to 2^30. Suggested values are between 2K and 2M.

Parameters

  syncInterval | Approximate number of uncompressed bytes to write in each block.

Implemented in Avro.File.DataFileWriter< T >.

## ◆ Sync()

long Avro.File.IFileWriter< T >.Sync | ( |  | ) |

Forces the end of the current block, emitting a synchronization marker.

Returns
  Current position as a value that may be passed to IFileReader<T>.Seek(long).

Implemented in Avro.File.DataFileWriter< T >.

The documentation for this interface was generated from the following file:

- src/apache/main/File/IFileWriter.cs