org.apache.hadoop.hbase.io.hfile.bucket
Class BucketAllocator.Bucket

java.lang.Object
  extended by org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.Bucket
Enclosing class:
BucketAllocator

public static final class BucketAllocator.Bucket
extends Object


Constructor Summary
BucketAllocator.Bucket(long offset)
           
 
Method Summary
 void addAllocation(long offset)
           
 long allocate()
          Allocate a block in this bucket, return the offset representing the position in physical space
 int freeCount()
           
 long getBaseOffset()
           
 int getFreeBytes()
           
 int getItemAllocationSize()
           
 int getUsedBytes()
           
 boolean hasFreeSpace()
           
 boolean isCompletelyFree()
           
 boolean isUninstantiated()
           
 int sizeIndex()
           
 int usedCount()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BucketAllocator.Bucket

public BucketAllocator.Bucket(long offset)
Method Detail

isUninstantiated

public boolean isUninstantiated()

sizeIndex

public int sizeIndex()

getItemAllocationSize

public int getItemAllocationSize()

hasFreeSpace

public boolean hasFreeSpace()

isCompletelyFree

public boolean isCompletelyFree()

freeCount

public int freeCount()

usedCount

public int usedCount()

getFreeBytes

public int getFreeBytes()

getUsedBytes

public int getUsedBytes()

getBaseOffset

public long getBaseOffset()

allocate

public long allocate()
Allocate a block in this bucket, return the offset representing the position in physical space

Returns:
the offset in the IOEngine

addAllocation

public void addAllocation(long offset)
                   throws BucketAllocatorException
Throws:
BucketAllocatorException


Copyright © 2015 The Apache Software Foundation. All rights reserved.