rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
{ return render; } | { return cellRenderer; } | public ListCellRenderer getCellRenderer() { return render; } |
void setSelectionMode(int a) { sel_model.setSelectionMode(a); } | public void setSelectionMode(int a) { selectionModel.setSelectionMode(a); } | void setSelectionMode(int a) { sel_model.setSelectionMode(a); } |
public void popupMenuCanceled(PopupMenuEvent event); | void popupMenuCanceled(PopupMenuEvent event); | public void popupMenuCanceled(PopupMenuEvent event); |
public void popupMenuWillBecomeInvisible(PopupMenuEvent event); | void popupMenuWillBecomeInvisible(PopupMenuEvent event); | public void popupMenuWillBecomeInvisible(PopupMenuEvent event); |
public void popupMenuWillBecomeVisible(PopupMenuEvent event); | void popupMenuWillBecomeVisible(PopupMenuEvent event); | public void popupMenuWillBecomeVisible(PopupMenuEvent event); |
sel_model.addListSelectionListener (listener); | listenerList.add (ListSelectionListener.class, listener); | public void addListSelectionListener (ListSelectionListener listener) { sel_model.addListSelectionListener (listener); } |
sel.append(entryId); | sel.append(stepEntryId); | private String buildNested(NestedExpression nestedExpression, StringBuffer sel, List values) { sel.append("SELECT DISTINCT("); sel.append(entryId); sel.append(") FROM "); sel.append(entryTable); for (int i = 0; i < nestedExpression.getExpressionCount(); i++) { Expressio... |
sel.append(entryTable); | sel.append(currentTable); if (log.isDebugEnabled()) { log.debug("Thus far, query is: " + sel.toString()); } | private String buildNested(NestedExpression nestedExpression, StringBuffer sel, List values) { sel.append("SELECT DISTINCT("); sel.append(entryId); sel.append(") FROM "); sel.append(entryTable); for (int i = 0; i < nestedExpression.getExpressionCount(); i++) { Expressio... |
return (entryId); | return (stepEntryId); | private String buildNested(NestedExpression nestedExpression, StringBuffer sel, List values) { sel.append("SELECT DISTINCT("); sel.append(entryId); sel.append(") FROM "); sel.append(entryTable); for (int i = 0; i < nestedExpression.getExpressionCount(); i++) { Expressio... |
sel.append(fieldName(query.getOrderBy())); | public List query(WorkflowExpressionQuery query) throws StoreException { Expression expression = query.getExpression(); StringBuffer sel = new StringBuffer(); List values = new ArrayList(); String columnName = null; if (expression.isNested()) { columnName = buildNested(... | |
if (query.getSortOrder() == WorkflowExpressionQuery.SORT_ASC) { sel.append(" ASC"); | if (query.getOrderBy() != 0) { String fName = fieldName(query.getOrderBy()); if (log.isDebugEnabled()) { log.debug("Found fieldName as: " + fName); } sel.append(fName); String current = sel.toString(); String entry = current.substring(0, current.indexOf(columnName)) + columnName + ") , " + fName + " "; entry... | public List query(WorkflowExpressionQuery query) throws StoreException { Expression expression = query.getExpression(); StringBuffer sel = new StringBuffer(); List values = new ArrayList(); String columnName = null; if (expression.isNested()) { columnName = buildNested(... |
sel.append(" DESC"); | sel.append(columnName); | public List query(WorkflowExpressionQuery query) throws StoreException { Expression expression = query.getExpression(); StringBuffer sel = new StringBuffer(); List values = new ArrayList(); String columnName = null; if (expression.isNested()) { columnName = buildNested(... |
} if (log.isDebugEnabled()) { log.debug("Finished query is: " + sel.toString()); | public List query(WorkflowExpressionQuery query) throws StoreException { Expression expression = query.getExpression(); StringBuffer sel = new StringBuffer(); List values = new ArrayList(); String columnName = null; if (expression.isNested()) { columnName = buildNested(... | |
void setLong(int parameterIndex, long x) throws SQLException; | void setLong(int index, long value) throws SQLException; | void setLong(int parameterIndex, long x) throws SQLException; |
void setInt(int parameterIndex, int x) throws SQLException; | void setInt(int index, int value) throws SQLException; | void setInt(int parameterIndex, int x) throws SQLException; |
public Timestamp(long date) | public Timestamp(int year, int month, int day, int hour, int minute, int second, int nanos) | public Timestamp(long date) { super(date - (date % 1000)); nanos = (int) (date % 1000) * 1000000; } |
super(date - (date % 1000)); nanos = (int) (date % 1000) * 1000000; | super(year, month, day, hour, minute, second); this.nanos = nanos; | public Timestamp(long date) { super(date - (date % 1000)); nanos = (int) (date % 1000) * 1000000; } |
void setTimestamp(int parameterIndex, Timestamp x) | void setTimestamp(int index, Timestamp value) | void setTimestamp(int parameterIndex, Timestamp x) throws SQLException; |
void setNull(int parameterIndex, int sqlType) throws SQLException; | void setNull(int index, int sqlType) throws SQLException; | void setNull(int parameterIndex, int sqlType) throws SQLException; |
void setObject(int parameterIndex, Object x) throws SQLException; | void setObject(int index, Object value, int sqlType, int scale) throws SQLException; | void setObject(int parameterIndex, Object x) throws SQLException; |
long getLong(String columnName) throws SQLException; | long getLong(int columnIndex) throws SQLException; | long getLong(String columnName) throws SQLException; |
public static BufferedImage read(InputStream input) | public static BufferedImage read(ImageInputStream stream) | public static BufferedImage read(InputStream input) throws IOException { return read(new MemoryCacheImageInputStream(input)); } |
return read(new MemoryCacheImageInputStream(input)); | Iterator providers = getRegistry().getServiceProviders(ImageReaderSpi.class, true); while (providers.hasNext()) { ImageReaderSpi spi = (ImageReaderSpi) providers.next(); if (spi.canDecodeInput(stream)) { ImageReader reader = spi.createReaderInstance(); reader.setInput(stream); return reader.read(0, null); } } return nu... | public static BufferedImage read(InputStream input) throws IOException { return read(new MemoryCacheImageInputStream(input)); } |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); title.setFont(defaults.getFont("InternalFrame.titleFont")); selectedTextColor = defaults.getColor("InternalFrame.activeTitleForeground"); selectedTitleColor = defaults.getColor("InternalFrame.activeTitleBackground"); notSelectedTextColor = defaults.getColor("In... | title.setFont(UIManager.getFont("InternalFrame.titleFont")); selectedTextColor = UIManager.getColor("InternalFrame.activeTitleForeground"); selectedTitleColor = UIManager.getColor("InternalFrame.activeTitleBackground"); notSelectedTextColor = UIManager.getColor("InternalFrame.inactiveTitleForeground"); notSelectedTitle... | protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); title.setFont(defaults.getFont("InternalFrame.titleFont")); selectedTextColor = defaults.getColor("InternalFrame.activeTitleForeground"); selectedTitleColor = defaults.getColor("InternalFrame.activeTitleBackgroun... |
if (!isOpaque()) return; | protected void paintTitleBackground(Graphics g) { Color saved = g.getColor(); Dimension dims = getSize(); Color bg = getBackground(); if (frame.isSelected()) bg = selectedTitleColor; else bg = notSelectedTitleColor; g.setColor(bg); g.fillRect(0, 0, dims.width, dims.height); g.setCol... | |
if (closeIcon != null) | if (closeIcon != null && closeButton != null) | protected void setButtonIcons() { if (closeIcon != null) closeButton.setIcon(closeIcon); if (iconIcon != null) iconButton.setIcon(iconIcon); if (maxIcon != null) maxButton.setIcon(maxIcon); } |
if (iconIcon != null) | if (iconIcon != null && iconButton != null) | protected void setButtonIcons() { if (closeIcon != null) closeButton.setIcon(closeIcon); if (iconIcon != null) iconButton.setIcon(iconIcon); if (maxIcon != null) maxButton.setIcon(maxIcon); } |
if (maxIcon != null) | if (maxIcon != null && maxButton != null) | protected void setButtonIcons() { if (closeIcon != null) closeButton.setIcon(closeIcon); if (iconIcon != null) iconButton.setIcon(iconIcon); if (maxIcon != null) maxButton.setIcon(maxIcon); } |
return null; | return new DummyIcon(); | public static Icon createEmptyFrameIcon() { return null; } |
{ this("", null, 0); } | { this(null, null, CENTER); } | public JLabel() { this("", null, 0); } |
{ hor_text_pos = textPosition; } | { if (textPosition != horizontalTextPosition) { int oldPos = horizontalTextPosition; horizontalTextPosition = checkHorizontalKey(textPosition, "horizontalTextPosition"); firePropertyChange(HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, oldPos, horizontalTextPosition); } } | public void setHorizontalTextPosition(int textPosition) { // Sets the horizontal position of the label's text, relative to its image. hor_text_pos = textPosition; } |
public JMenuItem(String text) | public JMenuItem() | public JMenuItem(String text) { this(text, null); } |
this(text, null); | super(); init(null, null); | public JMenuItem(String text) { this(text, null); } |
Uu.p("got a repaint event: " + evt); | public void startRepaintLoop() { //Uu.sleep(2000); while (true) { //Uu.sleep(1000); // wait for a repaint event ReflowEvent evt = root.queue.waitForNextRepaintEvent(); if (evt == null) { // we're being shutdown return; ... | |
tm.rollback(); | failed = true; tm.rollback(); | private void end() throws Exception { try { if (Status.STATUS_MARKED_ROLLBACK == tm.getStatus()) { tm.rollback(); } else { tm.commit(); } } finally { if (oldTx != n... |
Connection conn = ds.getConnection(); | Connection conn = getConnection(); Message m = ref.getMessage(); boolean incremented = false; | public void addReference(long channelID, MessageReference ref, Transaction tx) throws Exception { if (tx != null) { //In a tx so we just add the ref in the tx in memory for now TransactionCallback callback = getCallback(tx); callback.addReferenceToAdd(channelID, ref); }... |
{ Message m = ref.getMessage(); | { LockMap.instance.obtainLock(m); | public void addReference(long channelID, MessageReference ref, Transaction tx) throws Exception { if (tx != null) { //In a tx so we just add the ref in the tx in memory for now TransactionCallback callback = getCallback(tx); callback.addReferenceToAdd(channelID, ref); }... |
synchronized (m) { m.incPersistentChannelCount(); | storeMessage(m, psMessage); } else { psMessage = conn.prepareStatement(updateMessageChannelCount); | public void addReference(long channelID, MessageReference ref, Transaction tx) throws Exception { if (tx != null) { //In a tx so we just add the ref in the tx in memory for now TransactionCallback callback = getCallback(tx); callback.addReferenceToAdd(channelID, ref); }... |
if (m.getPersistentChannelCount() == 1) { psMessage = conn.prepareStatement(insertMessage); storeMessage(m, psMessage); } else { psMessage = conn.prepareStatement(updateMessageChannelCount); updateMessageChannelCount(m, psMessage); } rows = psMessage.executeUpdate(); if (trace) { log.trace("Inserted/updated " + ro... | updateMessageChannelCount(m, psMessage); | public void addReference(long channelID, MessageReference ref, Transaction tx) throws Exception { if (tx != null) { //In a tx so we just add the ref in the tx in memory for now TransactionCallback callback = getCallback(tx); callback.addReferenceToAdd(channelID, ref); }... |
wrap.end(); | try { wrap.end(); } finally { if (wrap.failed && incremented) { m.decPersistentChannelCount(); } LockMap.instance.releaseLock(m); } | public void addReference(long channelID, MessageReference ref, Transaction tx) throws Exception { if (tx != null) { //In a tx so we just add the ref in the tx in memory for now TransactionCallback callback = getCallback(tx); callback.addReferenceToAdd(channelID, ref); }... |
conn = ds.getConnection(); | getLocks(references); conn = getConnection(); | public void addReferences(long channelID, List references, boolean loaded) throws Exception { Connection conn = null; PreparedStatement psInsertReference = null; PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; TransactionWrapper wrap = new TransactionW... |
Message m = ref.getMessage(); | public void addReferences(long channelID, List references, boolean loaded) throws Exception { Connection conn = null; PreparedStatement psInsertReference = null; PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; TransactionWrapper wrap = new TransactionW... | |
synchronized (m) { m.incPersistentChannelCount(); | Message m = ref.getMessage(); m.incPersistentChannelCount(); addsToReverse.add(ref); | public void addReferences(long channelID, List references, boolean loaded) throws Exception { Connection conn = null; PreparedStatement psInsertReference = null; PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; TransactionWrapper wrap = new TransactionW... |
boolean added; if (m.getPersistentChannelCount() == 1) { storeMessage(m, psInsertMessage); added = true; | boolean added; if (m.getPersistentChannelCount() == 1) { storeMessage(m, psInsertMessage); added = true; } else { updateMessageChannelCount(m, psUpdateMessage); added = false; } if (usingBatchUpdates) { if (added) { psInsertMessage.addBatch(); messageInsertsInBatch = true; | public void addReferences(long channelID, List references, boolean loaded) throws Exception { Connection conn = null; PreparedStatement psInsertReference = null; PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; TransactionWrapper wrap = new TransactionW... |
updateMessageChannelCount(m, psUpdateMessage); added = false; } if (usingBatchUpdates) { if (added) | psUpdateMessage.addBatch(); messageUpdatesInBatch = true; } } else { if (added) { int rows = psInsertMessage.executeUpdate(); if (trace) | public void addReferences(long channelID, List references, boolean loaded) throws Exception { Connection conn = null; PreparedStatement psInsertReference = null; PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; TransactionWrapper wrap = new TransactionW... |
psInsertMessage.addBatch(); messageInsertsInBatch = true; | log.trace("Inserted " + rows + " rows"); | public void addReferences(long channelID, List references, boolean loaded) throws Exception { Connection conn = null; PreparedStatement psInsertReference = null; PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; TransactionWrapper wrap = new TransactionW... |
else | } else { int rows = psUpdateMessage.executeUpdate(); if (trace) | public void addReferences(long channelID, List references, boolean loaded) throws Exception { Connection conn = null; PreparedStatement psInsertReference = null; PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; TransactionWrapper wrap = new TransactionW... |
psUpdateMessage.addBatch(); messageUpdatesInBatch = true; | log.trace("Updated " + rows + " rows"); | public void addReferences(long channelID, List references, boolean loaded) throws Exception { Connection conn = null; PreparedStatement psInsertReference = null; PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; TransactionWrapper wrap = new TransactionW... |
else { if (added) { int rows = psInsertMessage.executeUpdate(); if (trace) { log.trace("Inserted " + rows + " rows"); } } else { int rows = psUpdateMessage.executeUpdate(); if (trace) { log.trace("Updated " + rows + " rows"); } } psInsertMessage.close(); psInsertMessage = null; psUpdateMessage.close(); psUpdateMessag... | psInsertMessage.close(); psInsertMessage = null; psUpdateMessage.close(); psUpdateMessage = null; } } | public void addReferences(long channelID, List references, boolean loaded) throws Exception { Connection conn = null; PreparedStatement psInsertReference = null; PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; TransactionWrapper wrap = new TransactionW... |
} catch (Throwable t) { } } wrap.end(); | } catch (Throwable t) { } } try { wrap.end(); } finally { if (wrap.failed) { this.decPersistentCounts(addsToReverse); } this.releaseLocks(references); } | public void addReferences(long channelID, List references, boolean loaded) throws Exception { Connection conn = null; PreparedStatement psInsertReference = null; PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; TransactionWrapper wrap = new TransactionW... |
log.info("creating tables"); | protected void createSchema() throws Exception { Connection conn = null; TransactionWrapper tx = new TransactionWrapper(); log.info("creating tables"); try { conn = ds.getConnection(); try { conn.createStatement().executeUpdate(create... | |
conn = ds.getConnection(); | conn = getConnection(); | protected void createSchema() throws Exception { Connection conn = null; TransactionWrapper tx = new TransactionWrapper(); log.info("creating tables"); try { conn = ds.getConnection(); try { conn.createStatement().executeUpdate(create... |
conn.createStatement().executeUpdate(createIdxMessageRefLoaded); if (trace) { log.trace(createIdxMessageRefLoaded + " succeeded"); } } catch (SQLException e) { log.debug(createIdxMessageRefLoaded + " failed!", e); } try { conn.createStatement().executeUpdate(createIdxMessageRefReliable); if (trace) { log.trace(createI... | protected void createSchema() throws Exception { Connection conn = null; TransactionWrapper tx = new TransactionWrapper(); log.info("creating tables"); try { conn = ds.getConnection(); try { conn.createStatement().executeUpdate(create... | |
conn = ds.getConnection(); | conn = getConnection(); | public List getMessages(List messageIds) throws Exception { if (trace) { log.trace("Getting batch of messages for " + messageIds); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); ... |
if (!rs.wasNull()) | if (type != CoreMessage.TYPE) | public List getMessages(List messageIds) throws Exception { if (trace) { log.trace("Getting batch of messages for " + messageIds); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); ... |
conn = ds.getConnection(); | conn = getConnection(); | public int getNumberOfUnloadedReferences(long channelID) throws Exception { if (trace) { log.trace("getting number of unloaded references for channel [" + channelID + "]"); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new Trans... |
public List getReferenceInfos(long channelID, int number) throws Exception { | public List getReferenceInfos(long channelID, long minOrdering, int number) throws Exception { | public List getReferenceInfos(long channelID, int number) throws Exception { if (trace) { log.trace("loading message reference info for channel " + channelID + " for " + number + " refs"); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; T... |
conn = getConnection(); | public List getReferenceInfos(long channelID, int number) throws Exception { if (trace) { log.trace("loading message reference info for channel " + channelID + " for " + number + " refs"); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; T... | |
conn = ds.getConnection(); | int tries = 0; | public List getReferenceInfos(long channelID, int number) throws Exception { if (trace) { log.trace("loading message reference info for channel " + channelID + " for " + number + " refs"); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; T... |
ps = conn.prepareStatement(loadReferenceInfo); | List refs = new ArrayList(); | public List getReferenceInfos(long channelID, int number) throws Exception { if (trace) { log.trace("loading message reference info for channel " + channelID + " for " + number + " refs"); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; T... |
ps.setLong(1, channelID); if (trace) | if (number == 0) | public List getReferenceInfos(long channelID, int number) throws Exception { if (trace) { log.trace("loading message reference info for channel " + channelID + " for " + number + " refs"); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; T... |
log.trace(JDBCUtil.statementToString(loadReferenceInfo)); | return refs; | public List getReferenceInfos(long channelID, int number) throws Exception { if (trace) { log.trace("loading message reference info for channel " + channelID + " for " + number + " refs"); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; T... |
rs = ps.executeQuery(); | do { ps = conn.prepareStatement(loadReferenceInfo); ps.setLong(1, channelID); ps.setLong(2, minOrdering); ps.setLong(3, minOrdering + (int)size - 1); rs = ps.executeQuery(); int count = 0; while (rs.next() && count < number) { long msgId = rs.getLong(1); long ordering = rs.getLong(2); int deliveryCount = rs.getInt... | public List getReferenceInfos(long channelID, int number) throws Exception { if (trace) { log.trace("loading message reference info for channel " + channelID + " for " + number + " refs"); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; T... |
int totalRows = 0; List infos = new ArrayList(); while (totalRows < number && rs.next()) | if (tries == MAX_TRIES) | public List getReferenceInfos(long channelID, int number) throws Exception { if (trace) { log.trace("loading message reference info for channel " + channelID + " for " + number + " refs"); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; T... |
long msgId = rs.getLong(1); long ordering = rs.getLong(2); int deliveryCount = rs.getInt(3); ReferenceInfo ri = new ReferenceInfo(msgId, ordering, deliveryCount); infos.add(ri); totalRows++; } return infos; | throw new IllegalStateException("Could not find sufficient references after trying " + tries + " times"); } return refs; | public List getReferenceInfos(long channelID, int number) throws Exception { if (trace) { log.trace("loading message reference info for channel " + channelID + " for " + number + " refs"); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; T... |
return ""; | log.error("Failed to get sql properties", shouldnothappen); return null; | public String getSqlProperties() { try { ByteArrayOutputStream boa = new ByteArrayOutputStream(); sqlProperties.store(boa, ""); return new String(boa.toByteArray()); } catch (IOException shouldnothappen) { return ""; } } |
conn = ds.getConnection(); | conn = getConnection(); getLocks(allRefs); | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
Iterator iter = refsToAdd.iterator(); | iter = refsToAdd.iterator(); | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
synchronized (m) { m.incPersistentChannelCount(); boolean added; if (m.getPersistentChannelCount() == 1) { storeMessage(m, psInsertMessage); | m.incPersistentChannelCount(); addsToReverse.add(ref); boolean added; if (m.getPersistentChannelCount() == 1) { storeMessage(m, psInsertMessage); added = true; } else { updateMessageChannelCount(m, psUpdateMessage); added = false; } if (batch) { if (added) { psInsertMessage.addBatch(); messageInsertsInBatch = tru... | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
added = true; | if (trace) { log.trace("Inserted " + rows + " rows"); } | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
updateMessageChannelCount(m, psUpdateMessage); | int rows = psUpdateMessage.executeUpdate(); | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
added = false; } if (batch) { if (added) | if (trace) | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
psInsertMessage.addBatch(); messageInsertsInBatch = true; | log.trace("Updated " + rows + " rows"); | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
else { psUpdateMessage.addBatch(); messageUpdatesInBatch = true; } } else { if (added) { int rows = psInsertMessage.executeUpdate(); if (trace) { log.trace("Inserted " + rows + " rows"); } } else { int rows = psUpdateMessage.executeUpdate(); if (trace) { log.trace("Updated " + rows + " rows"); } } psInsertMessage.clo... | } psInsertMessage.close(); psInsertMessage = null; psUpdateMessage.close(); psUpdateMessage = null; } } | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
synchronized (m) { m.decPersistentChannelCount(); boolean removed; if (m.getPersistentChannelCount() == 0) { removeMessage(m, psDeleteMessage); removed = true; | m.decPersistentChannelCount(); removesToReverse.add(pair.ref); boolean removed; if (m.getPersistentChannelCount() == 0) { removeMessage(m, psDeleteMessage); removed = true; } else { updateMessageChannelCount(m, psUpdateMessage); removed = false; } if (batch) { if (removed) { psDeleteMessage.addBatch(); messageD... | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
updateMessageChannelCount(m, psUpdateMessage); | psUpdateMessage.addBatch(); messageUpdatesInBatch = true; } } else { if (removed) { int rows = psDeleteMessage.executeUpdate(); | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
removed = false; } if (batch) { if (removed) | if (trace) | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
psDeleteMessage.addBatch(); messageDeletionsInBatch = true; | log.trace("Deleted " + rows + " rows"); | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
else | } else { int rows = psUpdateMessage.executeUpdate(); if (trace) | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
psUpdateMessage.addBatch(); messageUpdatesInBatch = true; | log.trace("Updated " + rows + " rows"); | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
else { if (removed) { int rows = psDeleteMessage.executeUpdate(); if (trace) { log.trace("Deleted " + rows + " rows"); } } else { int rows = psUpdateMessage.executeUpdate(); if (trace) { log.trace("Updated " + rows + " rows"); } } psDeleteMessage.close(); psDeleteMessage = null; psUpdateMessage.close(); psUpdateMessa... | psDeleteMessage.close(); psDeleteMessage = null; psUpdateMessage.close(); psUpdateMessage = null; } | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
wrap.end(); | try { wrap.end(); } finally { if (wrap.failed) { this.decPersistentCounts(addsToReverse); this.incPersistentCounts(removesToReverse); } this.releaseLocks(allRefs); } | protected void handleBeforeCommit1PC(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //For one phase we simply add rows corresponding to the refs //and remove rows corresponding to the deliveries in one jdbc tx //We also need to store or remove messages as necessary, depen... |
conn = ds.getConnection(); | this.getLocks(refs); conn = getConnection(); | protected void handleBeforeCommit2PC(List refsToRemove, Transaction tx) throws Exception { Connection conn = null; PreparedStatement psUpdateMessage = null; PreparedStatement psDeleteMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { con... |
Iterator iter = refsToRemove.iterator(); | iter = refsToRemove.iterator(); | protected void handleBeforeCommit2PC(List refsToRemove, Transaction tx) throws Exception { Connection conn = null; PreparedStatement psUpdateMessage = null; PreparedStatement psDeleteMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { con... |
synchronized (m) { m.decPersistentChannelCount(); boolean removed; if (m.getPersistentChannelCount() == 0) { removeMessage(m, psDeleteMessage); removed = true; | m.decPersistentChannelCount(); removesToReverse.add(ref); boolean removed; if (m.getPersistentChannelCount() == 0) { removeMessage(m, psDeleteMessage); removed = true; } else { updateMessageChannelCount(m, psUpdateMessage); removed = false; } if (batch) { if (removed) { psDeleteMessage.addBatch(); messageDeletio... | protected void handleBeforeCommit2PC(List refsToRemove, Transaction tx) throws Exception { Connection conn = null; PreparedStatement psUpdateMessage = null; PreparedStatement psDeleteMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { con... |
updateMessageChannelCount(m, psUpdateMessage); removed = false; } if (batch) { if (removed) | psUpdateMessage.addBatch(); messageUpdatesInBatch = true; } } else { if (removed) { int rows = psDeleteMessage.executeUpdate(); if (trace) | protected void handleBeforeCommit2PC(List refsToRemove, Transaction tx) throws Exception { Connection conn = null; PreparedStatement psUpdateMessage = null; PreparedStatement psDeleteMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { con... |
psDeleteMessage.addBatch(); messageDeletionsInBatch = true; | log.trace("Deleted " + rows + " rows"); | protected void handleBeforeCommit2PC(List refsToRemove, Transaction tx) throws Exception { Connection conn = null; PreparedStatement psUpdateMessage = null; PreparedStatement psDeleteMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { con... |
else | } else { int rows = psUpdateMessage.executeUpdate(); if (trace) | protected void handleBeforeCommit2PC(List refsToRemove, Transaction tx) throws Exception { Connection conn = null; PreparedStatement psUpdateMessage = null; PreparedStatement psDeleteMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { con... |
psUpdateMessage.addBatch(); messageUpdatesInBatch = true; | log.trace("Updated " + rows + " rows"); | protected void handleBeforeCommit2PC(List refsToRemove, Transaction tx) throws Exception { Connection conn = null; PreparedStatement psUpdateMessage = null; PreparedStatement psDeleteMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { con... |
else { if (removed) { int rows = psDeleteMessage.executeUpdate(); if (trace) { log.trace("Deleted " + rows + " rows"); } } else { int rows = psUpdateMessage.executeUpdate(); if (trace) { log.trace("Updated " + rows + " rows"); } } psDeleteMessage.close(); psDeleteMessage = null; psUpdateMessage.close(); psUpdateMessa... | protected void handleBeforeCommit2PC(List refsToRemove, Transaction tx) throws Exception { Connection conn = null; PreparedStatement psUpdateMessage = null; PreparedStatement psDeleteMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { con... | |
} if (messageUpdatesInBatch) { int[] rows = psUpdateMessage.executeBatch(); if (trace) { logBatchUpdate(updateMessageChannelCount, rows, "updated"); } | protected void handleBeforeCommit2PC(List refsToRemove, Transaction tx) throws Exception { Connection conn = null; PreparedStatement psUpdateMessage = null; PreparedStatement psDeleteMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { con... | |
wrap.end(); | try { wrap.end(); } finally { if (wrap.failed) { this.incPersistentCounts(removesToReverse); } this.releaseLocks(refs); } | protected void handleBeforeCommit2PC(List refsToRemove, Transaction tx) throws Exception { Connection conn = null; PreparedStatement psUpdateMessage = null; PreparedStatement psDeleteMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { con... |
conn = ds.getConnection(); | getLocks(refs); conn = getConnection(); | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psInsertMessage = n... |
Iterator iter = refsToAdd.iterator(); | iter = refsToAdd.iterator(); | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psInsertMessage = n... |
synchronized (m) { m.incPersistentChannelCount(); boolean added; if (m.getPersistentChannelCount() == 1) { storeMessage(m, psInsertMessage); | m.incPersistentChannelCount(); addsToReverse.add(pair.ref); boolean added; if (m.getPersistentChannelCount() == 1) { storeMessage(m, psInsertMessage); added = true; } else { updateMessageChannelCount(m, psUpdateMessage); added = false; } if (batch) { if (added) { psInsertMessage.addBatch(); messageInsertsInBatch ... | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psInsertMessage = n... |
added = true; | if (trace) { log.trace("Inserted " + rows + " rows"); } | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psInsertMessage = n... |
updateMessageChannelCount(m, psUpdateMessage); | int rows = psUpdateMessage.executeUpdate(); | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psInsertMessage = n... |
added = false; } if (batch) { if (added) | if (trace) | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psInsertMessage = n... |
psInsertMessage.addBatch(); messageInsertsInBatch = true; | log.trace("Updated " + rows + " rows"); | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psInsertMessage = n... |
else { psUpdateMessage.addBatch(); messageUpdatesInBatch = true; } } else { if (added) { int rows = psInsertMessage.executeUpdate(); if (trace) { log.trace("Inserted " + rows + " rows"); } } else { int rows = psUpdateMessage.executeUpdate(); if (trace) { log.trace("Updated " + rows + " rows"); } } psInsertMessage.clo... | } psInsertMessage.close(); psInsertMessage = null; psUpdateMessage.close(); psUpdateMessage = null; } } | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psInsertMessage = n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.