com.hazelcast.ringbuffer
@Beta public enum OverflowPolicy extends Enum<OverflowPolicy>
Enum Constant and Description |
---|
FAIL
Using this policy the call will fail immediately and the oldest item will not be overwritten before it is old enough
to retire.
|
OVERWRITE
Using this policy the oldest item is overwritten no matter it is not old enough to retire.
|
Modifier and Type | Method and Description |
---|---|
static OverflowPolicy |
getById(int id)
Returns the OverflowPolicy for the given id.
|
int |
getId()
Gets the id for the given OverflowPolicy.
|
static OverflowPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OverflowPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OverflowPolicy OVERWRITE
public static final OverflowPolicy FAIL
public static OverflowPolicy[] values()
for (OverflowPolicy c : OverflowPolicy.values()) System.out.println(c);
public static OverflowPolicy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic int getId()
public static OverflowPolicy getById(int id)
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.