Thanks to visit codestin.com
Credit goes to github.com

Skip to content

why use table.ceilingEntry(internalKey)? #141

@XbuLee

Description

@XbuLee

in this method ,why use method table.ceilingEntry() instead of method table.get() ?
in my opintion ,skipListMap can not set null value, if the return value is null, then it means that the map does not have this value.

    Slice slice = table.get(internalKey);
    if(slice==null){
      return null;
    }
    if(internalKey.getValueType() == ValueType.DELETION){
      return LookupResult.deleted(key);
    }else {
      return LookupResult.ok(key, slice);
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions