code
stringlengths
73
34.1k
label
stringclasses
1 value
public void deregisterDeferredService() { Object obj = serviceReg.get(); if (obj == null) { // already deregistered so there is nothing to be done return; } if (obj instanceof CountDownLatch) { // If someone else has the latch, then let them do whateve...
java
public SELF withConfigOption(String key, String value) { if (key == null) { throw new java.lang.NullPointerException("key marked @NonNull but is null"); } if (value == null) { throw new java.lang.NullPointerException("value marked @NonNull but is null"); } ...
java
public StateStream getStateStream() { if(TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(this, tc, "getStateStream"); SibTr.exit(tc, "getStateStream", oststream); } return oststream; }
java
public boolean writeSilence(SIMPMessage m) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeSilence", new Object[] { m }); boolean sendMessage = true; JsMessage jsMsg = m.getMessage(); // There may be Completed ticks afte...
java
public boolean writeSilenceForced(SIMPMessage m) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeSilenceForced", new Object[] { m }); boolean msgRemoved = true; JsMessage jsMsg = m.getMessage(); long start = jsMsg.g...
java
public void writeSilenceForced(TickRange vtr) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeSilenceForced", new Object[] { vtr }); long start = vtr.startstamp; long end = vtr.endstamp; if (TraceComponent.isAnyTracing...
java
public void writeSilenceForced(long tick) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeSilenceForced", Long.valueOf(tick) ); // Details of the new silence long startTick = -1; long endTick = -1; long completed...
java
public List writeAckPrefix(long stamp) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeAckPrefix", Long.valueOf(stamp)); // Holds TickRanges of all Value ticks between AckPrefix // and completedPrefix // This is returned to the caller List<Tick...
java
public void restoreUncommitted(SIMPMessage m) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "restoreUncommitted", new Object[] { m }); TickRange tr = null; JsMessage jsMsg = m.getMessage(); long stamp = jsMsg.getGuaranteedValueValueTick(); lo...
java
public void restoreValue(SIMPMessage m) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "restoreValue", m); TickRange tr = null; long msgStoreId = AbstractItem.NO_ID; try { if (m.isInStore()) msgStoreId...
java
public synchronized void newGuessInStream(long tick) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "newGuessInStream", new Object[] { Long.valueOf(tick), Boolean.valueOf(containsGuesses), Long.valueOf(sendWindow), ...
java
public synchronized void guessesInStream() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "guessesInStream", Boolean.valueOf(containsGuesses)); containsGuesses = true; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc...
java
public synchronized void noGuessesInStream() throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "noGuessesInStream"); if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "oldContainesGuesses:" + cont...
java
public synchronized void initialiseSendWindow(long sendWindow, long definedSendWindow) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "initialiseSendWindow", new Object[] {Long.valueOf(sendWindow), Long.valueOf(definedSendWindow)} ); ...
java
public synchronized void setDefinedSendWindow(long newSendWindow) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setDefinedSendWindow", Long.valueOf(newSendWindow) ); definedSendWindow = newSendWindow; // PK41355 - Commenting out - should not be sending s...
java
public synchronized void updateAndPersistSendWindow() throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "updateAndPersistSendWindow" ); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { SibTr.debug(tc, "define...
java
private synchronized boolean msgCanBeSent( long stamp, boolean nackMsg ) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "msgCanBeSent", new Object[] { Long.valueOf(stamp), Boolean.valueOf(nackMsg), Long.valueOf(firstMsgOutsideWindow), B...
java
private synchronized TickRange msgRemoved(long tick, StateStream ststream, TransactionCommon tran) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "msgRemoved", new Object[]{Long.valueOf(tick), ...
java
public synchronized List getAllMessagesOnStream() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getAllMessagesOnStream"); List<Long> msgs = new LinkedList<Long>(); oststream.setCursor(0); // Get the first TickRange TickRange tr = oststream.g...
java
public synchronized List<TickRange> getAllMessageItemsOnStream(boolean includeUncommitted) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getAllMessageItemsOnStream", Boolean.valueOf(includeUncommitted)); List<TickRange> msgs = new LinkedList<TickRange>(); ...
java
public synchronized TickRange getTickRange(long tick) { oststream.setCursor(tick); // Get the TickRange return (TickRange) oststream.getNext().clone(); }
java
public OpenAPI read(Set<Class<?>> classes) { Set<Class<?>> sortedClasses = new TreeSet<>(new Comparator<Class<?>>() { @Override public int compare(Class<?> class1, Class<?> class2) { if (class1.equals(class2)) { return 0; } else if (cla...
java
public static MfpDiagnostics initialize() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "initialize"); // We should only do this once if (singleton == null) { singleton = new MfpDiagnostics(); singleton.register(packageList); } if (TraceComponent.is...
java
public void ffdcDumpDefault(Throwable t, IncidentStream is, Object callerThis, Object[] objs, String sourceId) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "ffdcDumpDefault"); // First trace the Throwable, so that we can actually spot the exception in the trace if (Tra...
java
private void dumpUsefulStuff(IncidentStream is, Object[] objs) { // The first parameter is a marker telling us what sort of data we have in subsequent // parameters. if (objs != null && objs.length > 0) { if (objs[0] == MfpConstants.DM_BUFFER && objs.length >= 4) dumpJmfBuffer(is, (byte[])obj...
java
private void dumpJmfBuffer(IncidentStream is, byte[] frame, int offset, int length) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "dumpJmfBuffer"); if (frame != null) { // If the length passed in is 0 we probably have rubbish in both the length // and the offset...
java
private void dumpJmfSlices(IncidentStream is, List<DataSlice> slices) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "dumpJmfSlices"); if (slices != null) { try { is.writeLine("JMF data slices", SibTr.formatSlices(slices, getDiagnosticDataLimitInt())); } ...
java
protected void initializeNonPersistent(MessageProcessor messageProcessor) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "initializeNonPersistent", messageProcessor); /* * Keep a local reference to the MessageProcessor object, as this allows ...
java
public void moveAllInDoubtToUnreconciled() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "moveAllInDoubtToUnreconciled"); DestinationTypeFilter filter = new DestinationTypeFilter(); filter.LOCAL = Boolean.TRUE; filter.INDOUBT = Boolea...
java
public void validateUnreconciled() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "validateUnreconciled"); JsMessagingEngine engine = messageProcessor.getMessagingEngine(); //find all local, unreconciled destinations ...
java
private void startNewReconstituteThread(Runnable runnable) throws InterruptedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "startNewReconstituteThread"); if (_reconstituteThreadpool == null) { createReconstituteThreadPoo...
java
private void waitUntilReconstitutionIsCompleted() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "waitUntilReconstitutionISCompleted"); // gracefully shutdown the pool _reconstituteThreadpool.shutdown(); //awaitTermination() is a bloc...
java
public final LinkHandler getLink(String linkName) { LinkTypeFilter filter = new LinkTypeFilter(); return (LinkHandler) linkIndex.findByName(linkName, filter); }
java
public DestinationHandler getDestination(JsDestinationAddress destinationAddr, boolean includeInvisible) throws SITemporaryDestinationNotFoundException, SIResourceException, SINotPossibleInCurrentConfigurationException { return getDestination(destinationAddr.getDestinationName(), ...
java
public final void removePseudoDestination(SIBUuid12 destinationUuid) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "removePseudoDestination", destinationUuid); destinationIndex.removePseudoUuid(destinationUuid); if (TraceComponent.isAnyTracing...
java
public void resetDestination(String destName) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "resetDestination", destName); try { DestinationHandler dh = destinationIndex.findByName( ...
java
public void resetLink(String linkName) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "resetLink", linkName); try { DestinationHandler link = linkIndex.findByName(linkName, null); checkDestinationHandlerExists( ...
java
public VirtualLinkDefinition getLinkDefinition(String busName) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getLinkDefinition", busName); ForeignBusDefinition foreignBus = messageProcessor.getForeignBus(busName); VirtualLinkDefinition link...
java
public String getTopicSpaceMapping(String busName, SIBUuid12 topicSpace) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getTopicSpaceMapping", new Object[] { busName, topicSpace }); VirtualLinkDefinition linkDef = getLinkDefinition(busName); ...
java
String createNewTemporaryDestinationName(String destinationPrefix, SIBUuid8 meUuid, Distribution distribution) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnab...
java
protected void removeDestination(DestinationHandler dh) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "removeDestination", dh); if (dh.isLink()) { if (linkIndex.containsKey(dh)) { linkIndex.remove(dh); ...
java
protected void createTransmissionDestination(SIBUuid8 remoteMEUuid) throws SIResourceException, SIMPDestinationAlreadyExistsException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createTransmissionDestination", remoteMEUuid); String destinationName ...
java
public void reconcileRemote() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "reconcileRemote"); DestinationTypeFilter filter = new DestinationTypeFilter(); //filter.REMOTE = Boolean.TRUE; filter.UNRECONCILED = Boolean.TRUE; SI...
java
private void checkDestinationHandlerExists( boolean condition, String destName, String engineName) throws SINotPossibleInCurrentConfigurationException, SITemporaryDestinationNotFoundException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) ...
java
private void checkBusExists(boolean condition, String foreignBusName, boolean linkError, Throwable cause) throws SINotPossibleInCurrentConfigurationException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, ...
java
private void checkMQLinkExists(boolean condition, String mqlinkName) throws SINotPossibleInCurrentConfigurationException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, "checkMQLinkExists", ...
java
private void checkQueuePointContainsLocalME(Set<String> queuePointLocalizingMEs, SIBUuid8 messagingEngineUuid, DestinationDefinition destinationDefinition, LocalizationDefiniti...
java
private void checkQueuePointLocalizingSize(Set<String> queuePointLocalizingMEs, DestinationDefinition destinationDefinition) { //There must be at least one queue point if (((destinationDefinition.getDestinationType() != DestinationType.SERVICE) && ...
java
private void setIsAsyncDeletionThreadStartable(boolean isStartable) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "setIsAsyncDeletionThreadStartable", new Boolean(isStartable)); synchronized (deletionThreadLock) { _isAsyncDeletion...
java
public JsDestinationAddress createSystemDestination(String prefix, Reliability reliability) throws SIResourceException, SIMPDestinationAlreadyExistsException, SIIncorrectCallException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createSystemDestination", ne...
java
public void addSubscriptionToDelete(SubscriptionItemStream stream) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "addSubscriptionToDelete", stream); synchronized (deletableSubscriptions) { deletableSubscriptions.add(stream); ...
java
public DestinationHandler getDestination(SIBUuid12 destinationUuid, boolean includeInvisible) throws SITemporaryDestinationNotFoundException, SINotPossibleInCurrentConfigurationException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getDestination", destinat...
java
public MQLinkHandler getMQLinkLocalization(SIBUuid8 mqLinkUuid, boolean includeInvisible) throws SIMPMQLinkCorruptException, SINotPossibleInCurrentConfigurationException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getMQLinkLocalization", mqLinkUuid); ...
java
void announceMPStarted(int startMode) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "announceMPStarted"); DestinationTypeFilter destFilter = new DestinationTypeFilter(); SIMPIterator itr = destinationIndex.iterator(destFilter); while ...
java
public BusHandler findBus(String busName) throws SIResourceException, SINotPossibleInCurrentConfigurationException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "findBus", new Object[] { busName }); // Get the bus ForeignBusTypeFilter filter ...
java
private boolean isLocalizationAvailable( BaseDestinationHandler baseDestinationHandler, DestinationAvailability destinationAvailability) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibT...
java
public List<JsDestinationAddress> getAllSystemDestinations(SIBUuid8 meUuid) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getAllSystemDestinations", meUuid); DestinationTypeFilter filter = new DestinationTypeFilter(); filter.LOCAL = Boolean....
java
protected void activateDestination(DestinationHandler dh) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "activateDestination", dh); if (dh.isLink()) { linkIndex.create(dh); } else { destinationI...
java
protected void corruptDestination(DestinationHandler dh) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "corruptDestination", dh); if (!dh.isLink() && destinationIndex.containsDestination(dh)) { destinationIndex.corrupt(dh); ...
java
@Override public void stopThread(StoppableThreadCache cache) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "stopThread"); this.hasToStop = true; //Remove this thread from the thread cache cache.deregisterThread(this); if (Tr...
java
public final void setUncheckedLocalException(Throwable ex) throws EJBException { ExceptionMappingStrategy exceptionStrategy = getExceptionMappingStrategy(); Throwable mappedException = exceptionStrategy.setUncheckedException(this, ex); if (mappedException != null) { if (mappedExcepti...
java
protected Boolean getApplicationExceptionRollback(Throwable t) { Boolean rollback; if (ivIgnoreApplicationExceptions) { rollback = null; } else { ComponentMetaData cmd = getComponentMetaData(); EJBModuleMetaDataImpl mmd = (EJBModuleMetaDataImpl) cmd.getModuleM...
java
public Map<String, Object> getContextData() { if (ivContextData == null) { ivContextData = new HashMap<String, Object>(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getContextData: created empty"); } return ivContextDa...
java
public static void addSubStatsToParent(SPIStats parentStats, SPIStats subStats) { StatsImpl p = (StatsImpl) parentStats; StatsImpl s = (StatsImpl) subStats; p.add(s); }
java
public static void addStatisticsToParent(SPIStats parentStats, SPIStatistic statistic) { StatsImpl p = (StatsImpl) parentStats; StatisticImpl s = (StatisticImpl) statistic; p.add(s); }
java
void addLastEntry(Object entry) { if (multiple == null) { if (!single.equals(entry)) { multiple = new LinkedList<Object>(); multiple.addLast(single); multiple.addLast(entry); } } else { if (!multiple.contains(entry)) { ...
java
boolean removeEntry(Object entry) { if (multiple == null) { if (entry.equals(single)) { single = null; return true; } } else { multiple.remove(entry); if (single.equals(entry)) { single = multiple.peekLast();...
java
public void alarm(final Object context) { long sleepInterval = 0; do { long startWakeUpTime = System.currentTimeMillis(); try { wakeUp(startDaemonTime, startWakeUpTime); } catch (Exception ex) { com.ibm.ws.ffdc.FFDCFilter.processException(ex, "com.ibm.ws.ca...
java
public static String encode(String decoded_string, String crypto_algorithm, String crypto_key) throws InvalidPasswordEncodingException, UnsupportedCryptoAlgorithmException { HashMap<String, String> props = new HashMap<String, String>(); if (crypto_key != null) { props.put...
java
public static String encode(String decoded_string, String crypto_algorithm, Map<String, String> properties) throws InvalidPasswordEncodingException, UnsupportedCryptoAlgorithmException { /* * check input: * * -- decoded_string: any string, any length, cannot be nu...
java
public static boolean isHashed(String encoded_string) { String algorithm = getCryptoAlgorithm(encoded_string); return isValidAlgorithm(algorithm, PasswordCipherUtil.getSupportedHashAlgorithms()); }
java
public static String passwordEncode(String decoded_string, String crypto_algorithm) { /* * check input: * * -- decoded_string: any string, any length, cannot be null, * may start with valid (supported) crypto algorithm tag * * -- crypto_algorithm: any stri...
java
public static String removeCryptoAlgorithmTag(String password) { if (null == password) { return null; } String rc = null; String data = password.trim(); if (data.length() >= 2) { if ('{' == data.charAt(0)) { int end = data.indexOf('}', 1);...
java
private static byte[] convert_viewable_to_bytes(String string) { if (null == string) { return null; } if (0 == string.length()) { return EMPTY_BYTE_ARRAY; } return Base64Coder.base64Decode(convert_to_bytes(string)); }
java
private static String convert_viewable_to_string(byte[] bytes) { String string = null; if (bytes != null) { if (bytes.length == 0) { string = EMPTY_STRING; } else { string = convert_to_string(Base64Coder.base64Encode(bytes)); } ...
java
private static String decode_password(String encoded_string, String crypto_algorithm) { /* * decoding process: * * -- check for empty algorithm tag * -- convert input String to byte[] using base64 decoding * -- decipher byte[] * -- convert byte[] to String ...
java
public static String encode_password(String decoded_string, String crypto_algorithm, Map<String, String> properties) { /* * encoding process: * * -- check for empty algorithm tag * -- convert input String to byte[] UTF8 conversion code * -- encipher byte[] ...
java
protected Asset getAsset(final String assetId, final boolean includeAttachments) throws FileNotFoundException, IOException, BadVersionException { Asset ass = readJson(assetId); ass.set_id(assetId); // We always get a wlp info when read back from Massive so create one if there isnt already one ...
java
protected String getName(final String relative) { return relative.substring(relative.lastIndexOf(File.separator) + 1); }
java
protected InputStream getInputStreamToLicenseInsideZip(final ZipInputStream zis, final String assetId, final String attachmentId) throws IOException { InputStream is = null; try { ZipEntry ze = zis.getNextEntry(); while (ze != null) { if (ze.isDirectory()) { ...
java
void reset( Object key) { _nodeKey[0] = key; _nodeKey[midPoint()] = key; _population = 1; _rightChild = null; _leftChild = null; _balance = 0; }
java
boolean hasChild() { boolean has = false; if ( (leftChild() != null) || (rightChild() != null) ) has = true; return has; }
java
public short balance() { if ( (_balance == -1) || (_balance == 0) || (_balance == 1) ) return _balance; else { String x = "Found invalid balance factor: " + _balance; throw new RuntimeException(x); } }
java
void setBalance( int b) { if ( (b == -1) || (b == 0) || (b == 1) ) _balance = (short) b; else { String x = "Attempt to set invalid balance factor: " + b; throw new IllegalArgumentException(x); } }
java
public boolean isLeafNode() { boolean leaf = false; if ( (_leftChild == null) && (_rightChild == null) ) leaf = true; return leaf; }
java
void findInsertPointInLeft( Object new1, NodeInsertPoint point) { int endp = endPoint(); findIndex(0, endp, new1, point); }
java
public int searchLeft( SearchComparator comp, Object searchKey) { int idx = -1; int top = middleIndex(); if (comp.type() == SearchComparator.EQ) idx = findEqual(comp, 0, top, searchKey); else idx = findGreater(comp, 0, top, searchKey); return idx; }
java
public int searchRight( SearchComparator comp, Object searchKey) { int idx = -1; int bot = middleIndex(); int right = rightMostIndex(); if (bot > right) { String x = "bot = " + bot + ", right = " + right; throw new OptimisticDepthException(x); }...
java
int searchAll( SearchComparator comp, Object searchKey) { int idx = -1; if (comp.type() == SearchComparator.EQ) idx = findEqual(comp, 0, rightMostIndex(), searchKey); else idx = findGreater(comp, 0, rightMostIndex(), searchKey); return idx; }
java
private int findEqual( SearchComparator comp, int lower, int upper, Object searchKey) { int nkeys = numKeys(lower, upper); int idx = -1; if (nkeys < 4) idx = sequentialSearchEqual(comp, lower, upper, searchKey); else idx = binarySearc...
java
private int sequentialSearchEqual( SearchComparator comp, int lower, int upper, Object searchKey) { int xcc; /* Current compare result */ int idx = -1; /* The returned index (-1 if not found) */ ...
java
private int findGreater( SearchComparator comp, int lower, int upper, Object searchKey) { int nkeys = numKeys(lower, upper); int idx = -1; if (nkeys < 4) idx = sequentialSearchGreater(comp, lower, upper, searchKey); else idx = binaryS...
java
private void findIndex( int lower, int upper, Object new1, NodeInsertPoint point) { int nkeys = numKeys(lower, upper); if (nkeys < 4) sequentialFindIndex(lower, upper, new1, point); else binaryFindIndex(lower, upper, new1, point); }
java
private void binaryFindIndex( int lower, int upper, Object new1, NodeInsertPoint point) { java.util.Comparator comp = insertComparator(); int xcc; /* Current compare result */ int lxcc = +1; /* Rememb...
java
int findDeleteInRight( Object delKey) { int idx = -1; int r = rightMostIndex(); int m = midPoint(); if (r > m) idx = findDelete(m, r, delKey); return idx; }
java
int findDelete( int lower, int upper, Object delKey) { int nkeys = numKeys(lower, upper); int idx = -1; if (nkeys < 4) idx = sequentialFindDelete(lower, upper, delKey); else idx = binaryFindDelete(lower, upper, delKey); return idx; }
java
private int sequentialFindDelete( int lower, int upper, Object delKey) { java.util.Comparator comp = deleteComparator(); int xcc; /* Current compare result */ int idx = -1; /* The returned index (-1 if no...
java
private int binaryFindDelete( int lower, int upper, Object delKey) { java.util.Comparator comp = insertComparator(); int xcc; /* Current compare result */ int i; int idx = -1; /* Returned index (-1 if...
java
public int middleIndex() { int x = midPoint(); int r = rightMostIndex(); if (r < midPoint()) x = r; return x; }
java
void addRightLeaf( Object new1) { GBSNode p = _index.getNode(new1); if (rightChild() != null) throw new RuntimeException("Help!"); setRightChild(p); }
java