@Override public void deleteCursorAcknowledge(long ackID) throws Exception { messageJournal.appendDeleteRecord(ackID, false); }
@Override public void deletePageComplete(long ackID) throws Exception { messageJournal.appendDeleteRecord(ackID, false); }
@Override public void appendDeleteRecord(final long id, final boolean sync, final IOCompletion completionCallback) throws Exception { if (log.isTraceEnabled()) { log.trace("AppendDelete " + id); } replicationManager.appendDeleteRecord(journalID, id); localJournal.appendDeleteRecord(id, sync, completionCallback); }
@Override public void deleteConnectionFactory(final String cfName) throws Exception { PersistedConnectionFactory oldCF = mapFactories.remove(cfName); if (oldCF != null) { jmsJournal.appendDeleteRecord(oldCF.getId(), false); } }
/** * @param id * @param sync * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendDeleteRecord(long, boolean) */ @Override public void appendDeleteRecord(final long id, final boolean sync) throws Exception { if (log.isTraceEnabled()) { log.trace("AppendDelete " + id); } replicationManager.appendDeleteRecord(journalID, id); localJournal.appendDeleteRecord(id, sync); }
@Override public void deleteBindings(PersistedType type, String name) throws Exception { Pair<PersistedType, String> key = new Pair<>(type, name); PersistedBindings currentBindings = mapBindings.remove(key); if (currentBindings != null) { jmsJournal.appendDeleteRecord(currentBindings.getId(), true); } }
@Override public void deleteDestination(final PersistedType type, final String name) throws Exception { PersistedDestination destination = destinations.remove(new Pair<>(type, name)); if (destination != null) { jmsJournal.appendDeleteRecord(destination.getId(), false); } }
@Override public void deletePageTransactional(final long recordID) throws Exception { readLock(); try { messageJournal.appendDeleteRecord(recordID, false); } finally { readUnLock(); } }
@Override public void deleteQueueStatus(long recordID) throws Exception { readLock(); try { bindingsJournal.appendDeleteRecord(recordID, true); } finally { readUnLock(); } }
@Override public void deleteID(long journalD) throws Exception { readLock(); try { bindingsJournal.appendDeleteRecord(journalD, false); } finally { readUnLock(); } }
@Override public void deleteAddressSetting(SimpleString addressMatch) throws Exception { PersistedAddressSetting oldSetting = mapPersistedAddressSettings.remove(addressMatch); if (oldSetting != null) { readLock(); try { bindingsJournal.appendDeleteRecord(oldSetting.getStoreId(), false); } finally { readUnLock(); } } }
@Override public void deleteSecurityRoles(SimpleString addressMatch) throws Exception { PersistedRoles oldRoles = mapPersistedRoles.remove(addressMatch); if (oldRoles != null) { readLock(); try { bindingsJournal.appendDeleteRecord(oldRoles.getStoreId(), false); } finally { readUnLock(); } } }
@Override public void deleteDuplicateID(final long recordID) throws Exception { readLock(); try { messageJournal.appendDeleteRecord(recordID, syncNonTransactional, getContext(syncNonTransactional)); } finally { readUnLock(); } }
/** * We don't need messageID now but we are likely to need it we ever decide to support a database */ @Override public void confirmPendingLargeMessage(long recordID) throws Exception { readLock(); try { messageJournal.appendDeleteRecord(recordID, true, getContext()); } finally { readUnLock(); } }
/** * @param packet */ private void handleAppendDelete(final ReplicationDeleteMessage packet) throws Exception { Journal journalToUse = getJournal(packet.getJournalID()); journalToUse.appendDeleteRecord(packet.getId(), noSync); }
@Override public void deleteHeuristicCompletion(final long id) throws Exception { readLock(); try { messageJournal.appendDeleteRecord(id, true, getContext(true)); } finally { readUnLock(); } }
@Override public void deleteMessage(final long messageID) throws Exception { readLock(); try { // Messages are deleted on postACK, one after another. // If these deletes are synchronized, we would build up messages on the Executor // increasing chances of losing deletes. // The StorageManager should verify messages without references messageJournal.appendDeleteRecord(messageID, false, getContext(false)); } finally { readUnLock(); } }
/** * Remove the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. * @throws ObjectStoreException if things go wrong. */ public boolean remove_committed(Uid uid, String typeName) throws ObjectStoreException { try { RecordInfo record = getContentForType(typeName).remove(uid); long id = (record != null ? record.id : getId(uid, typeName)); journal.appendDeleteRecord(id, syncDeletes); return true; } catch (IllegalStateException e) { tsLogger.i18NLogger.warn_hornetqobjectstore_remove_state_exception(e); return false; } catch(Exception e) { throw new ObjectStoreException(e); } }
/** * Remove the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. * @throws ObjectStoreException if things go wrong. */ public boolean remove_committed(Uid uid, String typeName) throws ObjectStoreException { try { RecordInfo record = getContentForType(typeName).remove(uid); long id = (record != null ? record.id : getId(uid, typeName)); journal.appendDeleteRecord(id, syncDeletes); return true; } catch (IllegalStateException e) { tsLogger.i18NLogger.warn_hornetqobjectstore_remove_state_exception(e); return false; } catch(Exception e) { throw new ObjectStoreException(e); } }
/** * Remove the object's committed state. * * @param uid The object to work on. * @param typeName The type of the object to work on. * @return <code>true</code> if no errors occurred, <code>false</code> * otherwise. * @throws ObjectStoreException if things go wrong. */ public boolean remove_committed(Uid uid, String typeName) throws ObjectStoreException { try { RecordInfo record = getContentForType(typeName).remove(uid); long id = (record != null ? record.id : getId(uid, typeName)); journal.appendDeleteRecord(id, syncDeletes); return true; } catch (IllegalStateException e) { tsLogger.i18NLogger.warn_hornetqobjectstore_remove_state_exception(e); return false; } catch(Exception e) { throw new ObjectStoreException(e); } }