public enum InputBuffer extends Enum<InputBuffer> implements FlowElementAttribute
Enum Constant and Description |
---|
ESCAPE
Builds a buffer onto the JVM heap, and will escape it to disks each time the buffer is full.
|
EXPAND
Builds a buffer onto the JVM heap, and will expand its area each time the buffer is full.
|
Modifier and Type | Method and Description |
---|---|
static InputBuffer |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static InputBuffer[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getDeclaringClass
public static final InputBuffer EXPAND
public static final InputBuffer ESCAPE
@CoGroup(inputBuffer = InputBuffer.ESCAPE)
public void invalid(@Key(...) List<Hoge> list, Result<Hoge> result) {
// contents of 'a' is not guaranteed after 'list.get(1)'
Hoge a = list.get(0);
Hoge b = list.get(1);
// the change may be lost after 'list.get(2)'
b.setValue(100);
list.get(2);
}
In such the case, application developers should create a copy of the object:
Hoge a = new Hoge();
Hoge b = new Hoge();
@CoGroup(inputBuffer = InputBuffer.ESCAPE)
public void invalid(@Key(...) List<Hoge> list, Result<Hoge> result) {
a.copyFrom(list.get(0));
b.copyFrom(list.get(1));
b.setValue(100);
list.get(2);
...
}
Note that, copy is not necessary if objects are only used one by one:
@CoGroup(inputBuffer = InputBuffer.ESCAPE)
public void invalid(@Key(...) List<Hoge> list, Result<Hoge> result) {
for (Hoge hoge : list) {
hoge.setValue(100);
result.add(hoge);
}
}
public static InputBuffer[] values()
for (InputBuffer c : InputBuffer.values()) System.out.println(c);
public static InputBuffer 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 nullCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.