NAME

Data::AnyXfer::Elastic::Import::File::MultiPart - An object representing a collection of data spanning multiple entries in storage

SYNOPSIS

    # create a multi-part entry...

    my $file =
        Data::AnyXfer::Elastic::Import::File::MultiPart->new(
        name => 'My-Data',
        storage => STORAGE,
        part_size => 2);

    # now use it exactly the same as a normal HH::C::ES::Import::File
    # object...

DESCRIPTION

This is a low-level module representing a Data::AnyXfer::Elastic collection of data, spanning multiple storage entries.

The interface allows the storage and interaction with the data collection.

The underlying file implementation is provided by: Data::AnyXfer::Elastic::Import::File::Simple

This module implements: Data::AnyXfer::Elastic::Import::File

ATTRIBUTES

part_size

Optional. Determines the number of data elements to store within a single storage entry.

Defaults to: 1000

This only takes effect between seperate calls to "add" in Data::AnyXfer::Elastic::Import::File.

For example, with a part_size of 2...

    $file->add(1..100);
    $file->add(1)
    $file->add(2);
    $file->add('bob', 'pav');

Would be implemented across three underlying storage entries. Part 1, containing 100 elements (the list of numbers 1 through 100), Part 2, containing 2 elements (the numbers '1' and '2'), and Part 3, containing 2 elements (the strings 'bob', and 'pav')

DATA INTERFACE

Please see Data::AnyXfer::Elastic::Import::File::Simple and Data::AnyXfer::Elastic::Import::File

ADDITIONAL METHODS

list_part_names

    my @names = $file->list_part_names;
        # e.g. returns 'name_00', 'name_01', 'name_02'

Lists the underlying storage entry names this multi-part file is implemented on top of.

Takes no arguments. May return an empty list on as-yet unused / empty instances of this class.

COPYRIGHT

This software is copyright (c) 2019, Anthony Lucas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.