Lines Matching refs:data

427   my ($self, $pos, $nrecs, @data) = @_;
447 return unless @data;
464 $self->_fixrecs(@data);
465 my $data = join '', @data;
466 my $datalen = length $data;
469 # compute length of data being removed
488 $self->_mtwrite($data, $self->{offsets}[$pos], $oldlen);
490 $self->_oadjust([$pos, $nrecs, @data]);
500 my $new = $data[$_-$pos];
514 my @newkeys = map $_-$nrecs+@data, @oldkeys;
518 # Now there might be too much data in the cache, if we spliced out
529 # write data into the file
530 # $data is the data to be written.
533 # Note that if length($data) > $len, the subsequent bytes will have to
534 # be moved up, and if length($data) < $len, they will have to
537 my ($self, $data, $pos, $len) = @_;
543 my $len_diff = length($data) - $len;
548 $self->_write_record($data);
555 # $bufsize is required to be at least as large as the data we're overwriting
569 $self->_write_record($data);
571 $writepos += length $data;
572 $data = $next_block;
577 # There might be leftover data at the end of the file
610 # Like _twrite, but the data-pos-len triple may be repeated; you may
622 my ($data, $pos, $len) = splice @_, 0, 3;
624 $data = $unwritten . $data;
627 $pos += $delta; # This is where the data goes now
628 my $dlen = length $data;
630 if ($len >= $dlen) { # the data will fit
631 $self->_write_record($data);
633 $data = ""; # All the data in the buffer has been written
635 my $writable = substr($data, 0, $len - $delta, "");
640 # At this point we've written some but maybe not all of the data.
641 # There might be a gap to close up, or $data might still contain a
642 # bunch of unwritten data that didn't fit.
643 my $ndlen = length $data;
645 $self->_write_record($data);
654 # downcopy (insert data that didn't fit; replace this data in memory
655 # with _later_ data that doesn't fit)
657 $unwritten = $self->_downcopy($data, $end, $_[1] - $end);
660 $unwritten = $self->_downcopy($data, $end);
666 # Copy block of data of length $len from position $spos to position $dpos
687 my $bytes_read = read $fh, my($data), $readsize;
689 if ($data eq "") {
693 $self->_write_record($data);
700 # Write $data into a block of length $len at position $pos,
702 # Instead of writing the last length($data) bytes from the block
708 my ($self, $data, $pos, $len) = @_;
717 $data .= $old;
720 # If last read was short, then $data now contains the entire rest
722 $writable = $data;
723 $data = "";
725 $writable = substr($data, 0, $readsize, "");
730 last if $last_read_was_short && $data eq "";
734 return $data;
737 # Adjust the object data structures following an '_mtwrite'
752 my ($pos, $nrecs, @data) = @$_;
762 $prev_end = $pos + @data - 1; # last record moved on this pass
767 for my $i (0 .. $#data) {
768 my $newlen = length $data[$i];
779 # # also this data has changed, so update it in the cache
780 # for (0 .. $#data) {
781 # $self->{cache}->update($pos + $_, $data[$_]);
784 # my @oldkeys = grep $_ >= $pos + @data, $self->{cache}->ckeys;
794 $delta_recs += @data - $nrecs; # net change in total number of records
810 # Now there might be too much data in the cache, if we spliced out
991 # all the data in a file forward $n bytes
1124 join("", @{$self->{deferred}}{$first_rec .. $last_rec}), # data
1285 # file contents and the internal data structures are consistent with
1405 # Total size of cached data should not exceed the specified limit
1408 _ci_warn("total stored data size is $total which exceeds the limit of $self->{memory}");
1485 # piece of data has moved from one heap element to another.
1644 # Return total amount of cached data
1717 _ci_warn "Total data in cache is $bytes, expected $self->[BYTES]";
1723 _ci_warn "Total data in cache is $bytes, exceeds maximum $self->[MAX]";
1738 # Heap data structure for use by cache LRU routines
1799 # Insert a piece of data into the heap with the indicated sequence number.
1804 my ($self, $key, $data, $seq) = @_;
1806 $self->_insert_new([$seq, $key, $data]);
1819 # Insert [$data, $seq] pair at or below item $i in the heap.
2066 contained the following data:
2152 Opening the data file in write-only or append mode is not supported.
2164 the I<read cache>. The amount of data in the read cache will not
2187 cached data.
2195 data you write into the array will not be written directly to the
2200 You may set the C<dw_size> option to limit the amount of data that can
2312 array. Handles must be attached to seekable sources of data---that
2369 instead of C<-E<gt>flush>. Note that in some cases, some of the data
2376 and you try to write still more deferred data, the buffer will be
2377 flushed. All buffered data will be written immediately, the buffer
2387 deferred. When you perform one of these operations, any deferred data
2394 immediately, but the writing of the actual data is deferred. This
2479 that the time to maintain complicated data structures inside the
2493 cache entry: about 310 bytes per cached data record, and about 21 bytes per offset table entry.