T - the typepublic abstract class AbstractRemoteTransport<T> extends java.lang.Object implements Transport
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.ExecutorService |
executorService
The kernel executorService
|
protected java.util.Map<Address,T> |
nodes
The nodes
|
| Constructor and Description |
|---|
AbstractRemoteTransport()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearDistributedStatistics(Address address)
Clear distributed statistics
|
void |
deltaDoWorkAccepted(Address address)
Delta doWork accepted
|
void |
deltaDoWorkRejected(Address address)
Delta doWork rejected
|
void |
deltaScheduleWorkAccepted(Address address)
Delta scheduleWork accepted
|
void |
deltaScheduleWorkRejected(Address address)
Delta scheduleWork rejected
|
void |
deltaStartWorkAccepted(Address address)
Delta startWork accepted
|
void |
deltaStartWorkRejected(Address address)
Delta startWork rejected
|
void |
deltaWorkFailed(Address address)
Delta work failed
|
void |
deltaWorkSuccessful(Address address)
Delta work successful
|
void |
doWork(Address address,
javax.resource.spi.work.DistributableWork work)
doWork
|
java.util.Set<Address> |
getAddresses(T physicalAddress)
Get the addresses
|
DistributedWorkManagerStatisticsValues |
getDistributedStatistics(Address address)
Get the distributed statistics
|
java.util.concurrent.ExecutorService |
getExecutorService()
Get the executorService.
|
java.lang.String |
getId()
Get the identifier of the transport
|
long |
getLongRunningFree(Address address)
Get The number of free thread in long running pool from a distributed work manager
|
protected abstract T |
getOwnAddress()
Get the own address
|
long |
getShortRunningFree(Address address)
Get The number of free thread in short running pool from a distributed work manager
|
void |
join(Address logicalAddress,
T physicalAddress)
join
|
void |
leave(T physicalAddress)
leave
|
void |
localClearDistributedStatistics(Address logicalAddress)
localClearDistributedStatistics
|
void |
localDeltaDoWorkAccepted(Address address)
Local delta doWork accepted
|
void |
localDeltaDoWorkRejected(Address address)
Local delta doWork rejected
|
void |
localDeltaScheduleWorkAccepted(Address address)
Local delta scheduleWork accepted
|
void |
localDeltaScheduleWorkRejected(Address address)
Local delta scheduleWork rejected
|
void |
localDeltaStartWorkAccepted(Address address)
Local delta startWork accepted
|
void |
localDeltaStartWorkRejected(Address address)
Local delta startWork rejected
|
void |
localDeltaWorkFailed(Address address)
Local delta work failed
|
void |
localDeltaWorkSuccessful(Address address)
Local delta work successful
|
void |
localDoWork(Address address,
javax.resource.spi.work.DistributableWork work)
localDoWork
|
DistributedWorkManagerStatisticsValues |
localGetDistributedStatistics(Address address)
localGetDistributedStatistics
|
long |
localGetLongRunningFree(Address address)
localGetLongRunningFree
|
long |
localGetShortRunningFree(Address address)
localGetShortRunningFree
|
long |
localPing()
localPing
|
void |
localScheduleWork(Address address,
javax.resource.spi.work.DistributableWork work)
localScheduleWork
|
long |
localStartWork(Address address,
javax.resource.spi.work.DistributableWork work)
localStartWork
|
void |
localUpdateLongRunningFree(Address logicalAddress,
java.lang.Long freeCount)
localUpdateLongRunningFree
|
void |
localUpdateShortRunningFree(Address logicalAddress,
java.lang.Long freeCount)
localUpdateShortRunningFree
|
void |
localWorkManagerAdd(Address address,
T physicalAddress)
localWorkManagerAdd
|
void |
localWorkManagerRemove(Address address)
localWorkManagerRemove
|
long |
ping(Address address)
Ping time to a distributed work manager
|
void |
register(Address address)
Register
|
void |
scheduleWork(Address address,
javax.resource.spi.work.DistributableWork work)
scheduleWork
|
protected abstract java.io.Serializable |
sendMessage(T physicalAddress,
ProtocolMessages.Request request,
java.io.Serializable... parameters)
send a messagge using specific protocol.
|
void |
setExecutorService(java.util.concurrent.ExecutorService executorService)
Set the executorService.
|
void |
setId(java.lang.String id)
Set the identifier
|
long |
startWork(Address address,
javax.resource.spi.work.DistributableWork work)
startWork
|
void |
unregister(Address address)
Unregister
|
void |
updateLongRunningFree(Address address,
long freeCount)
Update The number of free thread in long running pool from a distributed work manager
|
void |
updateShortRunningFree(Address address,
long freeCount)
Update The number of free thread in short running pool from a distributed work manager
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitialized, shutdown, startupprotected java.util.concurrent.ExecutorService executorService
public java.lang.String getId()
public void setId(java.lang.String id)
id - The valuepublic long ping(Address address)
public long getShortRunningFree(Address address)
TransportgetShortRunningFree in interface Transportaddress - The addresspublic long getLongRunningFree(Address address)
TransportgetLongRunningFree in interface Transportaddress - The addresspublic void updateShortRunningFree(Address address, long freeCount)
TransportupdateShortRunningFree in interface Transportaddress - The addressfreeCount - the number of freeThreadpublic void updateLongRunningFree(Address address, long freeCount)
TransportupdateLongRunningFree in interface Transportaddress - The addressfreeCount - the number of freeThreadpublic DistributedWorkManagerStatisticsValues getDistributedStatistics(Address address)
getDistributedStatistics in interface Transportaddress - The addresspublic void clearDistributedStatistics(Address address)
clearDistributedStatistics in interface Transportaddress - The addresspublic void deltaDoWorkAccepted(Address address)
deltaDoWorkAccepted in interface Transportaddress - The addresspublic void deltaDoWorkRejected(Address address)
deltaDoWorkRejected in interface Transportaddress - The addresspublic void deltaStartWorkAccepted(Address address)
deltaStartWorkAccepted in interface Transportaddress - The addresspublic void deltaStartWorkRejected(Address address)
deltaStartWorkRejected in interface Transportaddress - The addresspublic void deltaScheduleWorkAccepted(Address address)
deltaScheduleWorkAccepted in interface Transportaddress - The addresspublic void deltaScheduleWorkRejected(Address address)
deltaScheduleWorkRejected in interface Transportaddress - The addresspublic void deltaWorkSuccessful(Address address)
deltaWorkSuccessful in interface Transportaddress - The addresspublic void deltaWorkFailed(Address address)
deltaWorkFailed in interface Transportaddress - The addresspublic void doWork(Address address, javax.resource.spi.work.DistributableWork work) throws javax.resource.spi.work.WorkException
public void scheduleWork(Address address, javax.resource.spi.work.DistributableWork work) throws javax.resource.spi.work.WorkException
scheduleWork in interface Transportaddress - The addresswork - The workjavax.resource.spi.work.WorkException - Thrown if an error occurspublic long startWork(Address address, javax.resource.spi.work.DistributableWork work) throws javax.resource.spi.work.WorkException
public java.util.concurrent.ExecutorService getExecutorService()
public void setExecutorService(java.util.concurrent.ExecutorService executorService)
executorService - The executorService to set.public void register(Address address)
public void unregister(Address address)
unregister in interface Transportaddress - The addresspublic java.util.Set<Address> getAddresses(T physicalAddress)
physicalAddress - the physical addresspublic void join(Address logicalAddress, T physicalAddress)
logicalAddress - the logical addressphysicalAddress - the physical addresspublic void leave(T physicalAddress)
physicalAddress - the physical addresspublic long localPing()
public void localWorkManagerAdd(Address address, T physicalAddress)
address - the logical addressphysicalAddress - the physical addresspublic void localWorkManagerRemove(Address address)
address - the logical addresspublic void localDoWork(Address address, javax.resource.spi.work.DistributableWork work) throws javax.resource.spi.work.WorkException
address - the logical addresswork - the workjavax.resource.spi.work.WorkException - in case of errorpublic long localStartWork(Address address, javax.resource.spi.work.DistributableWork work) throws javax.resource.spi.work.WorkException
address - the logical addresswork - the workjavax.resource.spi.work.WorkException - in case of errorpublic void localScheduleWork(Address address, javax.resource.spi.work.DistributableWork work) throws javax.resource.spi.work.WorkException
address - the logical addresswork - the workjavax.resource.spi.work.WorkException - in case of errorpublic long localGetShortRunningFree(Address address)
address - the logical addresspublic long localGetLongRunningFree(Address address)
address - the logical addresspublic void localUpdateShortRunningFree(Address logicalAddress, java.lang.Long freeCount)
logicalAddress - the logical addressfreeCount - the free countpublic void localUpdateLongRunningFree(Address logicalAddress, java.lang.Long freeCount)
logicalAddress - the logical addressfreeCount - the free countpublic DistributedWorkManagerStatisticsValues localGetDistributedStatistics(Address address)
address - the logical addresspublic void localClearDistributedStatistics(Address logicalAddress)
logicalAddress - the logical addresspublic void localDeltaDoWorkAccepted(Address address)
address - the logical addresspublic void localDeltaDoWorkRejected(Address address)
address - the logical addresspublic void localDeltaStartWorkAccepted(Address address)
address - the logical addresspublic void localDeltaStartWorkRejected(Address address)
address - the logical addresspublic void localDeltaScheduleWorkAccepted(Address address)
address - the logical addresspublic void localDeltaScheduleWorkRejected(Address address)
address - the logical addresspublic void localDeltaWorkSuccessful(Address address)
address - the logical addresspublic void localDeltaWorkFailed(Address address)
address - the logical addressprotected abstract T getOwnAddress()
protected abstract java.io.Serializable sendMessage(T physicalAddress, ProtocolMessages.Request request, java.io.Serializable... parameters) throws javax.resource.spi.work.WorkException
physicalAddress - the physical addressrequest - the requestparameters - the parametersjavax.resource.spi.work.WorkException - in case of problem with the workCopyright © 2013 IronJacamar (http://www.ironjacamar.org)