W
- concrete type of the WaitKeyR
- concrete type of the resourcepublic abstract class ResourceRegistry<W extends WaitKey,R extends BlockingResource<W>> extends Object implements DataSerializable
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
destroyedNames |
protected CPGroupId |
groupId |
protected Map<String,R> |
resources |
protected ConcurrentMap<Tuple2<String,UUID>,Tuple2<Long,Long>> |
waitTimeouts |
Modifier | Constructor and Description |
---|---|
|
ResourceRegistry() |
protected |
ResourceRegistry(CPGroupId groupId) |
Modifier and Type | Method and Description |
---|---|
protected void |
addWaitKey(String name,
UUID invocationUid,
long timeoutMs) |
protected abstract ResourceRegistry<W,R> |
cloneForSnapshot() |
protected abstract R |
createNewResource(CPGroupId groupId,
String name) |
Collection<Long> |
destroy() |
CPGroupId |
getGroupId() |
protected R |
getOrInitResource(String name) |
R |
getResourceOrNull(String name) |
Map<Tuple2<String,UUID>,Tuple2<Long,Long>> |
getWaitTimeouts() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
protected void |
removeWaitKey(String name,
UUID invocationUid) |
protected void |
removeWaitKey(String name,
W key) |
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
protected CPGroupId groupId
protected final Map<String,R extends BlockingResource<W>> resources
public ResourceRegistry()
protected ResourceRegistry(CPGroupId groupId)
protected abstract ResourceRegistry<W,R> cloneForSnapshot()
public final CPGroupId getGroupId()
public final Collection<Long> destroy()
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.