public final class NoopTenantControl extends Object implements TenantControl, IdentifiedDataSerializable
NOOP_TENANT_CONTROL
Constructor and Description |
---|
NoopTenantControl() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getClassId()
Returns type identifier for this class.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
hashCode() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
Closeable |
setTenant(boolean createRequestScope)
Establish this tenant's thread-local context
Particular TenantControl implementation will control the details of how
createRequestScope parameter is handled, but in general,
if createRequestScope = false, only ClassLoader is set up,
if createRequestScope = true, in addition to ClassLoader,
other things like invocation, EJB/JPA/CDI context should be set up as well
In other words, if only app class needs to be resolved, set createRequestScope to false
If actually calling into user's code, set createRequestScope to true
|
void |
unregister()
To be called when the Hazelcast object attached to this tenant is destroyed.
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public Closeable setTenant(boolean createRequestScope)
TenantControl
setTenant
in interface TenantControl
createRequestScope
- whether to create CDI request scope for this contextpublic void unregister()
TenantControl
unregister
in interface TenantControl
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getClassId()
IdentifiedDataSerializable
getClassId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out)
DataSerializable
writeData
in interface DataSerializable
out
- outputpublic void readData(ObjectDataInput in)
DataSerializable
readData
in interface DataSerializable
in
- inputCopyright © 2019 Hazelcast, Inc.. All rights reserved.