Class ImmutableSessionInfo
java.lang.Object
com.databricks.jdbc.api.impl.ImmutableSessionInfo
- All Implemented Interfaces:
SessionInfo
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableSessionInfo
extends Object
implements SessionInfo
Immutable implementation of
SessionInfo.
Use the builder to create immutable instances:
ImmutableSessionInfo.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableSessionInfo. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableSessionInfo.Builderbuilder()Creates a builder forImmutableSessionInfo.static ImmutableSessionInfocopyOf(SessionInfo instance) Creates an immutable copy of aSessionInfovalue.booleanThis instance is equal to all instances ofImmutableSessionInfothat have equal attribute values.inthashCode()Computes a hash code from attributes:sessionId,computeResource,sessionHandle.toString()Prints the immutable valueSessionInfowith attribute values.final ImmutableSessionInfoCopy the current immutable object by setting a value for thecomputeResourceattribute.final ImmutableSessionInfowithSessionHandle(TSessionHandle value) Copy the current immutable object by setting a value for thesessionHandleattribute.final ImmutableSessionInfowithSessionId(String value) Copy the current immutable object by setting a value for thesessionIdattribute.
-
Method Details
-
sessionId
- Specified by:
sessionIdin interfaceSessionInfo- Returns:
- The value of the
sessionIdattribute
-
computeResource
- Specified by:
computeResourcein interfaceSessionInfo- Returns:
- The value of the
computeResourceattribute
-
sessionHandle
- Specified by:
sessionHandlein interfaceSessionInfo- Returns:
- The value of the
sessionHandleattribute
-
withSessionId
Copy the current immutable object by setting a value for thesessionIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sessionId- Returns:
- A modified copy of the
thisobject
-
withComputeResource
Copy the current immutable object by setting a value for thecomputeResourceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for computeResource- Returns:
- A modified copy of the
thisobject
-
withSessionHandle
Copy the current immutable object by setting a value for thesessionHandleattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sessionHandle (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aSessionInfovalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable SessionInfo instance
-
builder
Creates a builder forImmutableSessionInfo.ImmutableSessionInfo.builder() .sessionId(String) // requiredsessionId.computeResource(com.databricks.jdbc.common.IDatabricksComputeResource) // requiredcomputeResource.sessionHandle(com.databricks.jdbc.model.client.thrift.generated.TSessionHandle | null) // nullablesessionHandle.build();- Returns:
- A new ImmutableSessionInfo builder
-