public class AllocateOptions extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
canUseReservedSpace() |
boolean |
equals(Object o) |
static AllocateOptions |
forCreate(long sizeBytes,
BlockStoreLocation location)
Creates default allocation options for block create request.
|
static AllocateOptions |
forMove(BlockStoreLocation location)
Creates default allocation options for moving a block by a client request.
|
static AllocateOptions |
forRequestSpace(long sizeBytes,
BlockStoreLocation location)
Creates default allocation options for requesting more space for a block.
|
static AllocateOptions |
forTierMove(BlockStoreLocation location)
Creates default allocation options for moving a block during tier-move task.
|
BlockStoreLocation |
getLocation() |
long |
getSize() |
int |
hashCode() |
boolean |
isEvictionAllowed() |
boolean |
isForceLocation() |
AllocateOptions |
setEvictionAllowed(boolean evictionAllowed)
Sets value for whether eviction is allowed for allocation.
|
AllocateOptions |
setForceLocation(boolean forceLocation)
Sets value for whether to enforce location of allocation.
|
AllocateOptions |
setLocation(BlockStoreLocation location)
Sets the allocation location.
|
AllocateOptions |
setSize(long size)
Sets the allocation size.
|
AllocateOptions |
setUseReservedSpace(boolean useReservedSpace)
Sets value for whether this allocation can use reserved space.
|
String |
toString() |
public static AllocateOptions forCreate(long sizeBytes, BlockStoreLocation location)
sizeBytes
- size of allocationlocation
- location of allocationpublic static AllocateOptions forRequestSpace(long sizeBytes, BlockStoreLocation location)
sizeBytes
- size of allocationlocation
- location of allocationpublic static AllocateOptions forTierMove(BlockStoreLocation location)
location
- location of allocationpublic static AllocateOptions forMove(BlockStoreLocation location)
location
- location of allocationpublic AllocateOptions setLocation(BlockStoreLocation location)
location
- the allocation locationpublic AllocateOptions setSize(long size)
size
- the allocation size in bytespublic AllocateOptions setForceLocation(boolean forceLocation)
forceLocation
- force locationpublic AllocateOptions setEvictionAllowed(boolean evictionAllowed)
evictionAllowed
- eviction allowedpublic AllocateOptions setUseReservedSpace(boolean useReservedSpace)
useReservedSpace
- use reserved spacepublic BlockStoreLocation getLocation()
public long getSize()
public boolean isForceLocation()
public boolean isEvictionAllowed()
public boolean canUseReservedSpace()
Copyright © 2023. All Rights Reserved.