persistenceadapter.java

来自「OpenJMS是一个开源的Java Message Service API 1.」· Java 代码 · 共 427 行 · 第 1/2 页

JAVA
427
字号
    /**     * Update the specified persistent message handle.     *     * @param connection - the connection to use     * @param handle - the persistent handle to update     * @throws PersistenceException     */    public abstract void updateMessageHandle(Connection connection,                                             MessageHandle handle)        throws PersistenceException;    /**     * Remove the specified persistent message handle.     *     * @param connection - the connection to use     * @param handle - the persistent handle to remove     * @throws PersistenceException     * @throws PersistenceException     */    public abstract void removeMessageHandle(Connection connection,                                             MessageHandle handle)        throws PersistenceException;    /**     * Get all the persistent message handles for the specified destination     * and consumer name.     * <p>     * The returned messages reference unacked or unsent messages     * <p>     * NEED A STRATEGY WHEN WE HAVE LOTS OF MESSAGE HANDLES     *     * @param connection - the connection to use     * @param destination - the destination to reference     * @param name - the consumer name     * @throws PersistenceException     */    public abstract Vector getMessageHandles(Connection connection,                                             JmsDestination destination, String name)        throws PersistenceException;    /**     * Add the specified durable consumer     *     * @param connection - the connection to use     * @param topic - the name of the topic     * @param consumer the name of the consumer     * @throws PersistenceException     */    public abstract void addDurableConsumer(Connection connection,                                            String topic, String consumer)        throws PersistenceException;    /**     * Remove the durable consumer for the specified topic.     *     * @param connection - the connection to use     * @param consumer - the consumer name     * @throws PersistenceException     */    public abstract void removeDurableConsumer(Connection connection,                                               String consumer)        throws PersistenceException;    /**     * Check if the durable consumer exists     *     * @param connection - the connection to use     * @param name - durable consumer name     * @return boolean - true if it exists and false otherwise     * @throws PersistenceException     */    public abstract boolean durableConsumerExists(Connection connection,                                                  String name)        throws PersistenceException;    /**     * Get an enumerated list of all durable consumers for the     * specified JmsTopic destination     *     * @param connection - the connection to use     * @param topic - the topic to query     * @return Vector - list of durable subscriber names     * @throws PersistenceException     */    public abstract Enumeration getDurableConsumers(Connection connection,                                                    String topic)        throws PersistenceException;    /**     * Return a dictionary of all registered durable consumers. The     * dictionary is keyed on consumer name and maps to the underlying     * destination name. The destination name maybe a wildcard     *     * @param connection - the connection to use     * @return HashMap key=consumer name and value is destination     * @throws PersistenceException     */    public abstract HashMap getAllDurableConsumers(Connection connection)        throws PersistenceException;    /**     * Add a new destination to the database.     *     * @param connection - the connection to use     * @param name - the destination name     * @param queue - true if it pertains to a queue     * @throws PersistenceException     */    public abstract void addDestination(Connection connection,                                        String name, boolean queue)        throws PersistenceException;    /**     * Remove the destination with the specified name and all registered     * consumers from the database.     * Consumer registrations.     *     * @param connection - the connection to use     * @param destination - the name of the destination     * @throws PersistenceException     */    public abstract void removeDestination(Connection connection,                                           String destination)        throws PersistenceException;    /**     * Determine if a particular destination name exists     *     * @param connection - the connection to use     * @param name - the name to query     * @return boolean - true if it exists; false otherwise     * @throws PersistenceException     */    public abstract boolean checkDestination(Connection connection,                                             String name)        throws PersistenceException;    /**     * Get a list of all destinations stored in the database     *     * @param connection - the connection to use     * @return Enumeration - the list of destinations     * @throws PersistenceException     */    public abstract Enumeration getAllDestinations(Connection connection)        throws PersistenceException;    /**     * Get the number of unsent messages for a the specified queue     *     * @param connection - the connection to use     * @param name - the name of the queue     * @return int - the number of unsent or unacked messages     * @throws PersistenceException     */    public abstract int getQueueMessageCount(Connection connection,                                             String name)        throws PersistenceException;    /**     * Return the number of unsent message for the specified durable     * consumer.     *     * @param connection - the connection to use     * @param destination - the destination name     * @param name - the name of the durable subscriber     * @return int - the nmber of unsent or unacked messages     * @throws PersistenceException     */    public abstract int getDurableConsumerMessageCount(Connection connection,                                                       String destination, String name)        throws PersistenceException;    /**     * Purge all processed messages from the database.     *     * @return int - the number of messages purged     */    public abstract int purgeMessages();    /**     * Return a connection to this persistent data store.     *     * @return Connection - a connection to the persistent store or null     * @throws PersistenceException - if it cannot retrieve a connection     */    public abstract Connection getConnection() throws PersistenceException;    public abstract Enumeration getAllUsers(Connection connection)        throws PersistenceException;    public abstract void addUser(Connection connection, User user)        throws PersistenceException;    public abstract void removeUser(Connection connection,                                    User user)        throws PersistenceException;    public abstract void updateUser(Connection connection,                                    User user)        throws PersistenceException;    public abstract User getUser(Connection connection,                                 User user)        throws PersistenceException;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?