| 1 | package Voldemort::ProtoBuff::BaseMessage; | ||
| 2 | |||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use IO::Select; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use Scalar::Util qw(reftype); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 1 | ▶ | use Voldemort::Message; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 0 | ▶ | use Voldemort::ProtoBuff::Spec2; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 10 | |||
| 11 | with 'Voldemort::Message'; | ||
| 12 | |||
| 13 | sub write { | ||
| 14 | carp "Implement write"; | ||
| 15 | return; | ||
| 16 | } | ||
| 17 | |||
| 18 | sub _get_entries { | ||
| 19 | shift; | ||
| 20 | my $node = shift; | ||
| 21 | my @nodes = ($node); | ||
| 22 | my $ref = reftype $node; | ||
| 23 | |||
| 24 | @nodes = @$node if ( defined $ref and $ref eq 'ARRAY' ); | ||
| 25 | |||
| 26 | my $time = time(); | ||
| 27 | my @result; | ||
| 28 | foreach my $node (@nodes) { | ||
| 29 | push( | ||
| 30 | @result, | ||
| 31 | Voldemort::ProtoBuff::Spec2::ClockEntry->new( | ||
| 32 | { | ||
| 33 | node_id => $node, | ||
| 34 | version => time() | ||
| 35 | } | ||
| 36 | ) | ||
| 37 | ); | ||
| 38 | } | ||
| 39 | return \@result; | ||
| 40 | } | ||
| 41 | |||
| 42 | sub read { | ||
| 43 | carp "Implement write"; | ||
| 44 | return; | ||
| 45 | } | ||
| 46 | 1; | ||
| 47 | |||