public class MutablePeerTableImpl extends PeerTableImpl implements IMutablePeerTable, ConfigurationListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
MutablePeerTableImpl.StorageEntry |
PeerTableImpl.PeerTableThreadFactory| Modifier and Type | Field and Description |
|---|---|
protected Configuration |
config |
protected boolean |
duplicateProtection |
protected int |
duplicateSize |
protected long |
duplicateTimer |
protected ScheduledFuture |
duplicationHandler |
protected ScheduledExecutorService |
duplicationScheduler |
protected IFsmFactory |
fsmFactory |
protected boolean |
isAcceptUndefinedPeer |
protected INetwork |
network |
protected INetworkGuard |
networkGuard |
protected ScheduledFuture |
overloadHandler |
protected ScheduledExecutorService |
overloadScheduler |
protected IOverloadManager |
ovrManager |
protected IMessageParser |
parser |
protected PeerTableListener |
peerTableListener |
protected Set<String> |
predefinedPeerTable |
protected IRouter |
router |
protected ISessionFactory |
sessionFactory |
protected IStatisticManager |
statisticFactory |
protected ConcurrentHashMap<String,MutablePeerTableImpl.StorageEntry> |
storageAnswers |
protected ITransportLayerFactory |
transportFactory |
assembler, concurrentFactory, dictionary, isStarted, metaData, peerTable, sessionDatasource, stopTimeOut| Constructor and Description |
|---|
MutablePeerTableImpl(Configuration config,
MetaData metaData,
IContainer stack,
IRouter router,
ISessionFactory sessionFactory,
IFsmFactory fsmFactory,
ITransportLayerFactory trFactory,
IMessageParser parser,
INetwork network,
IOverloadManager ovrManager,
IStatisticManager statisticFactory,
IConcurrentFactory concurrentFactory) |
| Modifier and Type | Method and Description |
|---|---|
Peer |
addPeer(URI peerURI,
String realm,
boolean connecting) |
protected Peer |
createPeer(int rating,
String uri,
String ip,
String portRange,
MetaData metaData,
Configuration globalConfig,
Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory transportFactory,
IStatisticManager statisticFactory,
IConcurrentFactory concurrentFactory,
IMessageParser parser) |
boolean |
elementChanged(int i,
Object data) |
Set<Realm> |
getAllRealms() |
ConcurrentHashMap<String,IConnection> |
getIncConnections() |
Set<String> |
getPredefinedPeerTable() |
ISessionFactory |
getSessionFactory()
Return instance of session factory
|
Statistic |
getStatistic(String name) |
IMessage |
isDuplicate(IMessage request)
Check message on duplicate
|
boolean |
isDuplicateProtection() |
boolean |
isWrapperFor(Class<?> aClass) |
protected IPeer |
newPeerInstance(int rating,
URI uri,
String ip,
String portRange,
boolean attCnn,
IConnection connection,
MetaData metaData,
Configuration globalConfig,
Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory transportFactory,
IMessageParser parser,
IStatisticManager statisticFactory,
IConcurrentFactory concurrentFactory) |
Peer |
removePeer(String host) |
void |
saveToDuplicate(String key,
IMessage answer)
Save message to duplicate storage
|
void |
setPeerTableListener(PeerTableListener peerTableListener) |
void |
start()
Start peer manager ( start network activity )
|
void |
stopping(int disconnectCause)
Run stopping procedure (unsynchronized)
|
<T> T |
unwrap(Class<T> aClass) |
addSessionReqListener, destroy, getPeer, getPeerTable, getSessionReqListeners, init, removeSessionListener, sendMessage, setAssembler, stoppedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSessionReqListener, destroy, getPeer, getSessionReqListeners, removeSessionListener, sendMessage, setAssembler, stoppedgetPeerTableprotected Configuration config
protected ISessionFactory sessionFactory
protected IFsmFactory fsmFactory
protected ITransportLayerFactory transportFactory
protected IMessageParser parser
protected IRouter router
protected boolean duplicateProtection
protected int duplicateSize
protected long duplicateTimer
protected ScheduledExecutorService duplicationScheduler
protected ScheduledFuture duplicationHandler
protected ConcurrentHashMap<String,MutablePeerTableImpl.StorageEntry> storageAnswers
protected boolean isAcceptUndefinedPeer
protected INetworkGuard networkGuard
protected INetwork network
protected IOverloadManager ovrManager
protected ScheduledExecutorService overloadScheduler
protected ScheduledFuture overloadHandler
protected PeerTableListener peerTableListener
protected IStatisticManager statisticFactory
public MutablePeerTableImpl(Configuration config, MetaData metaData, IContainer stack, IRouter router, ISessionFactory sessionFactory, IFsmFactory fsmFactory, ITransportLayerFactory trFactory, IMessageParser parser, INetwork network, IOverloadManager ovrManager, IStatisticManager statisticFactory, IConcurrentFactory concurrentFactory)
protected Peer createPeer(int rating, String uri, String ip, String portRange, MetaData metaData, Configuration globalConfig, Configuration peerConfig, IFsmFactory fsmFactory, ITransportLayerFactory transportFactory, IStatisticManager statisticFactory, IConcurrentFactory concurrentFactory, IMessageParser parser) throws InternalException, TransportException, URISyntaxException, UnknownServiceException
createPeer in class PeerTableImplInternalExceptionTransportExceptionURISyntaxExceptionUnknownServiceExceptionprotected IPeer newPeerInstance(int rating, URI uri, String ip, String portRange, boolean attCnn, IConnection connection, MetaData metaData, Configuration globalConfig, Configuration peerConfig, IFsmFactory fsmFactory, ITransportLayerFactory transportFactory, IMessageParser parser, IStatisticManager statisticFactory, IConcurrentFactory concurrentFactory) throws URISyntaxException, UnknownServiceException, InternalException, TransportException
public void setPeerTableListener(PeerTableListener peerTableListener)
setPeerTableListener in interface MutablePeerTablepublic boolean elementChanged(int i,
Object data)
elementChanged in interface ConfigurationListenerpublic boolean isDuplicateProtection()
public void start()
throws IllegalDiameterStateException,
IOException
IPeerTablestart in interface IPeerTablestart in class PeerTableImplIllegalDiameterStateExceptionIOExceptionpublic ConcurrentHashMap<String,IConnection> getIncConnections()
public void stopping(int disconnectCause)
IPeerTablestopping in interface IPeerTablestopping in class PeerTableImplpublic Peer addPeer(URI peerURI, String realm, boolean connecting)
addPeer in interface MutablePeerTablepublic Peer removePeer(String host)
removePeer in interface MutablePeerTablepublic Statistic getStatistic(String name)
getStatistic in interface MutablePeerTablepublic IMessage isDuplicate(IMessage request)
IMutablePeerTableisDuplicate in interface IMutablePeerTablerequest - checked messagepublic void saveToDuplicate(String key, IMessage answer)
IMutablePeerTablesaveToDuplicate in interface IMutablePeerTablekey - key of messageanswer - messagepublic ISessionFactory getSessionFactory()
IMutablePeerTablegetSessionFactory in interface IMutablePeerTablepublic boolean isWrapperFor(Class<?> aClass) throws InternalException
isWrapperFor in interface WrapperisWrapperFor in class PeerTableImplInternalExceptionpublic <T> T unwrap(Class<T> aClass) throws InternalException
unwrap in interface Wrapperunwrap in class PeerTableImplInternalExceptionCopyright © 2016. All Rights Reserved.