Package com.qfs.chunk

Interface IAllocationSettings

All Known Implementing Classes:
VectorsAllocationSettings

public interface IAllocationSettings
This interface is intended to pass further details on how to allocate a chunk of a given type. Those settings will be ignored by the allocator if they do not apply for the given type.
Author:
ActiveViam
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
    Returns the component type of the vectors to allocate, as in Types.TYPE_*.
    int
    The ID, that uniquely identifies those allocation settings.
    Returns null if swap is disabled, or the path in which to swap if swap is enabled.
    int
    Returns the size of the blocks in which vectors will be allocated.
    int
     
  • Method Details

    • getSwapDirectory

      String getSwapDirectory()
      Returns null if swap is disabled, or the path in which to swap if swap is enabled.

      Only applies to vector fields.

      If (and only if) null, this allocated chunk is NOT swapped.

      Returns:
      the directory in which we should swap the data, null if swap is disabled
    • getVectorBlockSize

      int getVectorBlockSize()
      Returns the size of the blocks in which vectors will be allocated.

      Only applies to vector fields.

      If the size is equal to or less than 0, the allocator is responsible for picking a size.

      Returns:
      the size of the blocks in which to allocate vectors
    • getComponentType

      int getComponentType()
      Returns the component type of the vectors to allocate, as in Types.TYPE_*.
      Returns:
      the component type of the vectors to allocate
      See Also:
    • getId

      int getId()
      The ID, that uniquely identifies those allocation settings.

      Two instances of IAllocationSettings are equals if and only if they have the same ID.

      This ID must be positive.

      It is also recommended that the call to this method be fast.

      Returns:
      the ID, that uniquely identifies those allocation settings
    • equals

      boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object