@Override public void removeAllMessages(ConnectionContext context) throws IOException { KahaRemoveDestinationCommand command = new KahaRemoveDestinationCommand(); command.setDestination(dest); store(command, true, null, null); }
private void updateIndex(Transaction tx, KahaRemoveDestinationCommand command) throws IOException { StoredDestination sd = getStoredDestination(command.getDestination(), tx); sd.orderIndex.clear(tx); sd.orderIndex.unload(tx); tx.free(sd.orderIndex.getPageId()); sd.messageIdIndex.clear(tx); sd.messageIdIndex.unload(tx); tx.free(sd.messageIdIndex.getPageId()); if (sd.subscriptions != null) { sd.subscriptions.clear(tx); sd.subscriptions.unload(tx); tx.free(sd.subscriptions.getPageId()); sd.subscriptionAcks.clear(tx); sd.subscriptionAcks.unload(tx); tx.free(sd.subscriptionAcks.getPageId()); } String key = key(command.getDestination()); storedDestinations.remove(key); destinations.remove(tx, key); }
public static KahaRemoveDestinationCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaRemoveDestinationCommand().mergeFramed(data).checktInitialized(); }
public static KahaRemoveDestinationCommand parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaRemoveDestinationCommand().mergeUnframed(data).checktInitialized(); }
public KahaRemoveDestinationCommand mergeFrom(KahaRemoveDestinationCommand other) { if (other.hasDestination()) { if (hasDestination()) { getDestination().mergeFrom(other.getDestination()); } else { setDestination(other.getDestination().clone()); } } return this; }
public boolean equals(KahaRemoveDestinationCommand obj) { if (hasDestination() ^ obj.hasDestination() ) return false; if (hasDestination() && ( !getDestination().equals(obj.getDestination()) )) return false; return true; }
public int serializedSizeUnframed() { if (memoizedSerializedSize != -1) return memoizedSerializedSize; int size = 0; if (hasDestination()) { size += computeMessageSize(1, getDestination()); } memoizedSerializedSize = size; return size; }
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { if (hasDestination()) { writeMessage(output, 1, getDestination()); } }
public java.util.ArrayList<String> missingFields() { java.util.ArrayList<String> missingFields = super.missingFields(); if( !hasDestination() ) { missingFields.add("destination"); } if( hasDestination() ) { try { getDestination().assertInitialized(); } catch (org.apache.activemq.protobuf.UninitializedMessageException e){ missingFields.addAll(prefix(e.getMissingFields(),"destination.")); } } return missingFields; }
public KahaRemoveDestinationCommand clone() { return new KahaRemoveDestinationCommand().mergeFrom(this); }
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaRemoveDestinationCommand.class ) return false; return equals((KahaRemoveDestinationCommand)obj); }
public void clear() { super.clear(); clearDestination(); }
public org.apache.activemq.protobuf.Message createMessage() { switch (this) { case KAHA_TRACE_COMMAND: return new KahaTraceCommand(); case KAHA_ADD_MESSAGE_COMMAND: return new KahaAddMessageCommand(); case KAHA_REMOVE_MESSAGE_COMMAND: return new KahaRemoveMessageCommand(); case KAHA_PREPARE_COMMAND: return new KahaPrepareCommand(); case KAHA_COMMIT_COMMAND: return new KahaCommitCommand(); case KAHA_ROLLBACK_COMMAND: return new KahaRollbackCommand(); case KAHA_REMOVE_DESTINATION_COMMAND: return new KahaRemoveDestinationCommand(); case KAHA_SUBSCRIPTION_COMMAND: return new KahaSubscriptionCommand(); case KAHA_PRODUCER_AUDIT_COMMAND: return new KahaProducerAuditCommand(); default: return null; } }
public static KahaRemoveDestinationCommand parseFramed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaRemoveDestinationCommand().mergeFramed(data).checktInitialized(); }
public static KahaRemoveDestinationCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaRemoveDestinationCommand().mergeUnframed(data).checktInitialized(); }
public KahaRemoveDestinationCommand mergeFrom(KahaRemoveDestinationCommand other) { if (other.hasDestination()) { if (hasDestination()) { getDestination().mergeFrom(other.getDestination()); } else { setDestination(other.getDestination().clone()); } } return this; }
public boolean equals(KahaRemoveDestinationCommand obj) { if (hasDestination() ^ obj.hasDestination() ) return false; if (hasDestination() && ( !getDestination().equals(obj.getDestination()) )) return false; return true; }
public int serializedSizeUnframed() { if (memoizedSerializedSize != -1) return memoizedSerializedSize; int size = 0; if (hasDestination()) { size += computeMessageSize(1, getDestination()); } memoizedSerializedSize = size; return size; }
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { if (hasDestination()) { writeMessage(output, 1, getDestination()); } }
public java.util.ArrayList<String> missingFields() { java.util.ArrayList<String> missingFields = super.missingFields(); if( !hasDestination() ) { missingFields.add("destination"); } if( hasDestination() ) { try { getDestination().assertInitialized(); } catch (org.apache.activemq.protobuf.UninitializedMessageException e){ missingFields.addAll(prefix(e.getMissingFields(),"destination.")); } } return missingFields; }