@GridToStringExclude public class GridKernalGatewayImpl extends Object implements GridKernalGateway, Serializable
Constructor and Description |
---|
GridKernalGatewayImpl(String gridName) |
Modifier and Type | Method and Description |
---|---|
GridKernalState |
getState()
Gets current kernal state.
|
GridFutureAdapter<?> |
onDisconnected()
Disconnected callback.
|
void |
onReconnected()
Reconnected callback.
|
void |
readLock()
Should be called on entering every kernal related call
originated directly or indirectly via public API.
|
void |
readLockAnyway()
Same as
GridKernalGateway.readLock() but doesn't throw IllegalStateException if grid stop. |
void |
readUnlock()
Should be called on leaving every kernal related call
originated directly or indirectly via public API.
|
void |
setState(GridKernalState state)
Sets kernal state.
|
String |
toString() |
boolean |
tryWriteLock(long timeout) |
String |
userStackTrace()
Gets user stack trace through the first call of grid public API.
|
void |
writeLock()
This method waits for all current calls to exit and blocks any further
GridKernalGateway.readLock() calls until GridKernalGateway.writeUnlock() method is called. |
void |
writeUnlock()
This method unblocks
GridKernalGateway.writeLock() . |
public GridKernalGatewayImpl(String gridName)
gridName
- Grid name.public void readLock() throws IllegalStateException
This method essentially acquires a read lock and multiple threads can enter the call without blocking.
readLock
in interface GridKernalGateway
IllegalStateException
- Thrown in case when no kernal calls are allowed.GridKernalGateway.readUnlock()
public void readLockAnyway()
GridKernalGateway.readLock()
but doesn't throw IllegalStateException if grid stop.readLockAnyway
in interface GridKernalGateway
public void readUnlock()
This method essentially releases the internal read-lock acquired previously
by GridKernalGateway.readLock()
method.
readUnlock
in interface GridKernalGateway
GridKernalGateway.readLock()
public void writeLock()
GridKernalGateway.readLock()
calls until GridKernalGateway.writeUnlock()
method is called.
This method essentially acquires the internal write lock.
writeLock
in interface GridKernalGateway
public boolean tryWriteLock(long timeout) throws InterruptedException
tryWriteLock
in interface GridKernalGateway
timeout
- Timeout.True
if write lock has been acquired.InterruptedException
- If interrupted.public GridFutureAdapter<?> onDisconnected()
onDisconnected
in interface GridKernalGateway
public void onReconnected()
onReconnected
in interface GridKernalGateway
public void writeUnlock()
GridKernalGateway.writeLock()
.
This method essentially releases internal write lock previously acquired
by GridKernalGateway.writeLock()
method.
writeUnlock
in interface GridKernalGateway
public void setState(GridKernalState state)
setState
in interface GridKernalGateway
state
- Kernal state to set.public GridKernalState getState()
getState
in interface GridKernalGateway
public String userStackTrace()
userStackTrace
in interface GridKernalGateway
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.0.final Release Date : December 29 2015