Package com.tangosol.persistence
Class GUIDHelper.GUIDResolver
- java.lang.Object
-
- com.tangosol.util.Base
-
- com.tangosol.persistence.GUIDHelper.GUIDResolver
-
- Enclosing class:
- GUIDHelper
public static class GUIDHelper.GUIDResolver extends Base
Resolver used during a recovery to discover the newest available GUID for a given partition.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Member,String[]>
f_mapGUID
The Map of registered GUIDs, keyed by member.protected String[]
m_asGUIDNewest
The resolved list of the newest GUIDs, indexed by partition-id.protected int
m_cPartitions
The partition-count.protected boolean
m_fSharedStorage
Specifies whether or not the storage is shared.protected Map<Member,PartitionSet>
m_mapResolved
The resolved map of members to the associated set of partitions.protected PartitionSet
m_partsUnresolved
The PartitionSet containing partitions that don't have corresponding GUIDs.
-
Constructor Summary
Constructors Constructor Description GUIDResolver(int cPartitions)
Construct a GUIDResolver for the specified partition-count.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Integer,String[]>
getMemberGUIDs()
Return a Map of member id to an array of GUIDs.String
getNewestGUID(int nPartition)
Return the newest GUID for the specified partition.String[]
getNewestGUIDs(PartitionSet parts)
Return the list of the newest GUIDs for the specified set of partitions.PartitionSet
getUnresolvedPartitions()
Retrieve a PartitionSet containing all partitions that don't have any corresponding GUIDs.boolean
isSharedStorage()
Check whether ior not all the partition stores visible by every member.void
registerGUIDs(Member member, String[] asGUID)
Register the specified list of GUIDs from the specified member.Map<Member,PartitionSet>
resolve()
Resolve the registered GUIDs and return a map associating each member to the set of partitions that it had registered as having the newest GUID for.-
Methods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
-
-
-
-
Field Detail
-
f_mapGUID
protected final Map<Member,String[]> f_mapGUID
The Map of registered GUIDs, keyed by member.
-
m_cPartitions
protected int m_cPartitions
The partition-count.
-
m_asGUIDNewest
protected String[] m_asGUIDNewest
The resolved list of the newest GUIDs, indexed by partition-id.
-
m_mapResolved
protected Map<Member,PartitionSet> m_mapResolved
The resolved map of members to the associated set of partitions.
-
m_partsUnresolved
protected PartitionSet m_partsUnresolved
The PartitionSet containing partitions that don't have corresponding GUIDs.
-
m_fSharedStorage
protected boolean m_fSharedStorage
Specifies whether or not the storage is shared. If true, every member can see all the newest partition stores.
-
-
Method Detail
-
registerGUIDs
public void registerGUIDs(Member member, String[] asGUID)
Register the specified list of GUIDs from the specified member.- Parameters:
member
- the memberasGUID
- the list of GUIDs
-
getNewestGUID
public String getNewestGUID(int nPartition)
Return the newest GUID for the specified partition.- Parameters:
nPartition
- the partition to return a GUID for- Returns:
- the newest GUIDs
-
getNewestGUIDs
public String[] getNewestGUIDs(PartitionSet parts)
Return the list of the newest GUIDs for the specified set of partitions.- Parameters:
parts
- the set of partitions to return GUIDs for- Returns:
- the list of newest GUIDs
-
getUnresolvedPartitions
public PartitionSet getUnresolvedPartitions()
Retrieve a PartitionSet containing all partitions that don't have any corresponding GUIDs.- Returns:
- a PartitionSet of all unresolved partitions
-
getMemberGUIDs
public Map<Integer,String[]> getMemberGUIDs()
Return a Map of member id to an array of GUIDs.- Returns:
- a Map of member id to an array of GUIDs
-
isSharedStorage
public boolean isSharedStorage()
Check whether ior not all the partition stores visible by every member.- Returns:
- true iff all the partition stores visible by every member
-
resolve
public Map<Member,PartitionSet> resolve()
Resolve the registered GUIDs and return a map associating each member to the set of partitions that it had registered as having the newest GUID for.- Returns:
- a map associating each member to the set of partitions it has the latest GUID for
-
-