public abstract class BaseManager extends Object
Modifier and Type | Class and Description |
---|---|
class |
BaseManager.ConnectionAwareOp |
class |
BaseManager.ResponseQueueCall |
class |
BaseManager.ResponsiveOperationHandler |
class |
BaseManager.ReturnResponseProcess |
class |
BaseManager.TargetAwareOp |
Modifier and Type | Field and Description |
---|---|
protected static String |
BATCH_OPS_EXECUTOR_NAME |
protected Counter |
dataMemberCount
Counter for normal/data (non-lite) members.
|
protected static String |
INTERNAL_OPS_EXECUTOR_NAME |
protected AtomicLong |
localIdGen |
protected ILogger |
logger |
protected List<MemberImpl> |
lsMembers |
protected ConcurrentMap<Long,Call> |
mapCalls |
protected Map<Address,MemberImpl> |
mapMembers |
protected int |
maxOperationLimit |
protected long |
maxOperationTimeout |
protected Node |
node |
protected Queue<Packet> |
qServiceThreadPacketCache |
protected int |
redoGiveUpThreshold |
protected int |
redoLogThreshold |
protected long |
redoWaitMillis |
protected long |
responsePollTimeout |
protected SystemLogService |
systemLogService |
protected Address |
thisAddress |
protected MemberImpl |
thisMember |
Modifier | Constructor and Description |
---|---|
protected |
BaseManager(Node node) |
Modifier and Type | Method and Description |
---|---|
void |
addRemoteCall(Call call) |
void |
checkServiceThread() |
Packet |
createRemotelyProcessablePacket(RemotelyProcessable rp) |
static MapEntry |
createSimpleMapEntry(FactoryImpl factory,
String name,
Object key,
Data value) |
void |
enqueueAndReturn(Processable obj) |
void |
enqueueAndWait(Processable processable) |
boolean |
enqueueAndWait(Processable processable,
int seconds) |
static Instance.InstanceType |
getInstanceType(String name) |
protected Address |
getMasterAddress() |
List<MemberImpl> |
getMembers() |
protected MemberImpl |
getNextMemberAfter(Address address,
boolean skipSuperClient,
int distance) |
protected MemberImpl |
getNextMemberAfter(List<MemberImpl> lsMembers,
Address address,
boolean skipSuperClient,
int distance) |
Node |
getNode() |
PacketProcessor |
getPacketProcessor(ClusterOperation operation) |
Call |
getRemoteCall(long id) |
Address |
getThisAddress() |
protected void |
handleInterruptedException(boolean safeToThrowException,
ClusterOperation op) |
void |
handleResponse(Packet packetResponse) |
protected boolean |
isActive() |
protected boolean |
isLiteMember() |
protected boolean |
isMaster() |
protected boolean |
isMigrating(Request req,
int replica) |
protected void |
logRedo(Request request,
Constants.RedoType redoType,
boolean isCaller) |
protected Packet |
obtainPacket() |
Packet |
obtainPacket(String name,
Object key,
Object value,
ClusterOperation operation,
long timeout) |
void |
registerPacketProcessor(ClusterOperation operation,
PacketProcessor packetProcessor) |
protected boolean |
releasePacket(Packet packet) |
Call |
removeRemoteCall(long id) |
protected void |
rethrowException(ClusterOperation operation,
AddressAwareException exception) |
boolean |
returnRedoResponse(Request request,
Constants.RedoType redoType) |
boolean |
returnResponse(Request request) |
boolean |
returnResponse(Request request,
Connection conn) |
protected boolean |
send(Packet packet,
Address address)
Do not forget to release packet if send fails.
|
protected boolean |
send(Packet packet,
Connection conn)
Do not forget to release packet if send fails.
|
void |
sendEvents(int eventType,
String name,
Data key,
Data value,
Map<Address,Boolean> mapListeners,
Address callerAddress,
boolean fireAndForget) |
protected boolean |
sendOrReleasePacket(Packet packet,
Address address) |
protected boolean |
sendOrReleasePacket(Packet packet,
Connection conn) |
boolean |
sendProcessableTo(RemotelyProcessable rp,
Address address) |
void |
sendProcessableTo(RemotelyProcessable rp,
Connection conn) |
void |
sendProcessableToAll(RemotelyProcessable rp,
boolean processLocally) |
protected boolean |
sendResponse(Packet packet) |
protected boolean |
sendResponse(Packet packet,
Address address) |
protected boolean |
sendResponseFailure(Packet packet) |
protected static final String BATCH_OPS_EXECUTOR_NAME
protected static final String INTERNAL_OPS_EXECUTOR_NAME
protected final List<MemberImpl> lsMembers
protected final Counter dataMemberCount
protected final Map<Address,MemberImpl> mapMembers
protected final ConcurrentMap<Long,Call> mapCalls
protected final AtomicLong localIdGen
protected final Address thisAddress
protected final MemberImpl thisMember
protected final Node node
protected final ILogger logger
protected final long responsePollTimeout
protected final long maxOperationTimeout
protected final int maxOperationLimit
protected final long redoWaitMillis
protected final int redoLogThreshold
protected final int redoGiveUpThreshold
protected final SystemLogService systemLogService
protected BaseManager(Node node)
public List<MemberImpl> getMembers()
public Address getThisAddress()
public Node getNode()
public static MapEntry createSimpleMapEntry(FactoryImpl factory, String name, Object key, Data value)
protected void rethrowException(ClusterOperation operation, AddressAwareException exception)
protected void logRedo(Request request, Constants.RedoType redoType, boolean isCaller)
public boolean returnRedoResponse(Request request, Constants.RedoType redoType)
public boolean returnResponse(Request request)
public boolean returnResponse(Request request, Connection conn)
protected void handleInterruptedException(boolean safeToThrowException, ClusterOperation op)
protected boolean isMigrating(Request req, int replica)
public static Instance.InstanceType getInstanceType(String name)
public void enqueueAndReturn(Processable obj)
public boolean enqueueAndWait(Processable processable, int seconds)
public void enqueueAndWait(Processable processable)
public Packet obtainPacket(String name, Object key, Object value, ClusterOperation operation, long timeout)
public Call getRemoteCall(long id)
public void addRemoteCall(Call call)
public Call removeRemoteCall(long id)
public void registerPacketProcessor(ClusterOperation operation, PacketProcessor packetProcessor)
public PacketProcessor getPacketProcessor(ClusterOperation operation)
public void sendEvents(int eventType, String name, Data key, Data value, Map<Address,Boolean> mapListeners, Address callerAddress, boolean fireAndForget)
public Packet createRemotelyProcessablePacket(RemotelyProcessable rp)
public void sendProcessableTo(RemotelyProcessable rp, Connection conn)
public boolean sendProcessableTo(RemotelyProcessable rp, Address address)
public void sendProcessableToAll(RemotelyProcessable rp, boolean processLocally)
protected Address getMasterAddress()
protected MemberImpl getNextMemberAfter(Address address, boolean skipSuperClient, int distance)
protected MemberImpl getNextMemberAfter(List<MemberImpl> lsMembers, Address address, boolean skipSuperClient, int distance)
protected boolean isMaster()
protected boolean isActive()
protected boolean isLiteMember()
protected Packet obtainPacket()
protected boolean releasePacket(Packet packet)
protected boolean sendResponse(Packet packet)
protected boolean sendResponseFailure(Packet packet)
public final void checkServiceThread()
public final void handleResponse(Packet packetResponse)
protected boolean send(Packet packet, Address address)
sendOrReleasePacket(Packet, Address)
protected final boolean send(Packet packet, Connection conn)
sendOrReleasePacket(Packet, Connection)
protected final boolean sendOrReleasePacket(Packet packet, Connection conn)
Copyright © 2013 Hazelcast, Inc.. All rights reserved.