Package com.google.cloud.spanner
Enum AsyncResultSet.CallbackResponse
- java.lang.Object
-
- java.lang.Enum<AsyncResultSet.CallbackResponse>
-
- com.google.cloud.spanner.AsyncResultSet.CallbackResponse
-
- All Implemented Interfaces:
Serializable
,Comparable<AsyncResultSet.CallbackResponse>
- Enclosing interface:
- AsyncResultSet
public static enum AsyncResultSet.CallbackResponse extends Enum<AsyncResultSet.CallbackResponse>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONTINUE
Tell the cursor to continue issuing callbacks when data is available.DONE
Tell the cursor you are done receiving results, even if there are more results sitting in the buffer.PAUSE
Tell the cursor to suspend all callbacks until application callsRowCursor#resume()
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AsyncResultSet.CallbackResponse
valueOf(String name)
Returns the enum constant of this type with the specified name.static AsyncResultSet.CallbackResponse[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONTINUE
public static final AsyncResultSet.CallbackResponse CONTINUE
Tell the cursor to continue issuing callbacks when data is available. This is the standard "I'm ready for more" response. If cursor is not completely drained of all ready results the callback will be called again immediately.
-
PAUSE
public static final AsyncResultSet.CallbackResponse PAUSE
Tell the cursor to suspend all callbacks until application callsRowCursor#resume()
.
-
DONE
public static final AsyncResultSet.CallbackResponse DONE
Tell the cursor you are done receiving results, even if there are more results sitting in the buffer. Once you return DONE, you will receive no further callbacks.Approximately equivalent to calling
RowCursor#cancel()
, and then returningPAUSE
, but more clear, immediate, and idiomatic.It is legal to commit a transaction that owns this read before actually returning
DONE
.
-
-
Method Detail
-
values
public static AsyncResultSet.CallbackResponse[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AsyncResultSet.CallbackResponse c : AsyncResultSet.CallbackResponse.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AsyncResultSet.CallbackResponse valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-