Class JDBCSocks5Repository

  • All Implemented Interfaces:
    tigase.db.DataSourceAware<tigase.db.DataRepository>, tigase.db.util.RepositoryVersionAware, Socks5Repository<tigase.db.DataRepository>

    public class JDBCSocks5Repository
    extends Object
    implements Socks5Repository<tigase.db.DataRepository>, tigase.db.util.RepositoryVersionAware
    Author:
    andrzej
    • Field Detail

      • data_repo

        protected tigase.db.DataRepository data_repo
    • Constructor Detail

      • JDBCSocks5Repository

        public JDBCSocks5Repository()
    • Method Detail

      • createTransferUsedByConnection

        public long createTransferUsedByConnection​(tigase.xmpp.jid.BareJID user,
                                                   Socks5ConnectionType type,
                                                   tigase.xmpp.jid.BareJID instance)
                                            throws tigase.db.TigaseDBException
        Specified by:
        createTransferUsedByConnection in interface Socks5Repository<tigase.db.DataRepository>
        Throws:
        tigase.db.TigaseDBException
      • setDataSource

        public void setDataSource​(tigase.db.DataRepository data_repo)
        Specified by:
        setDataSource in interface tigase.db.DataSourceAware<tigase.db.DataRepository>
      • updateTransferUsedByConnection

        public void updateTransferUsedByConnection​(tigase.xmpp.jid.BareJID user_id,
                                                   long stream_id,
                                                   long transferred_bytes)
                                            throws tigase.db.TigaseDBException
        Specified by:
        updateTransferUsedByConnection in interface Socks5Repository<tigase.db.DataRepository>
        Throws:
        tigase.db.TigaseDBException
      • getTransferLimits

        public Limits getTransferLimits()
                                 throws tigase.db.TigaseDBException
        Specified by:
        getTransferLimits in interface Socks5Repository<tigase.db.DataRepository>
        Throws:
        tigase.db.TigaseDBException
      • getTransferLimits

        public Limits getTransferLimits​(String domain)
                                 throws tigase.db.TigaseDBException
        Specified by:
        getTransferLimits in interface Socks5Repository<tigase.db.DataRepository>
        Throws:
        tigase.db.TigaseDBException
      • getTransferLimits

        public Limits getTransferLimits​(tigase.xmpp.jid.BareJID user)
                                 throws tigase.db.TigaseDBException
        Specified by:
        getTransferLimits in interface Socks5Repository<tigase.db.DataRepository>
        Throws:
        tigase.db.TigaseDBException
      • getTransferUsed

        public long getTransferUsed()
                             throws tigase.db.TigaseDBException
        Specified by:
        getTransferUsed in interface Socks5Repository<tigase.db.DataRepository>
        Throws:
        tigase.db.TigaseDBException
      • getTransferUsedByDomain

        public long getTransferUsedByDomain​(String domain)
                                     throws tigase.db.TigaseDBException
        Specified by:
        getTransferUsedByDomain in interface Socks5Repository<tigase.db.DataRepository>
        Throws:
        tigase.db.TigaseDBException
      • getTransferUsedByInstance

        public long getTransferUsedByInstance​(String instance)
                                       throws tigase.db.TigaseDBException
        Specified by:
        getTransferUsedByInstance in interface Socks5Repository<tigase.db.DataRepository>
        Throws:
        tigase.db.TigaseDBException
      • getTransferUsedByUser

        public long getTransferUsedByUser​(tigase.xmpp.jid.BareJID user)
                                   throws tigase.db.TigaseDBException
        Specified by:
        getTransferUsedByUser in interface Socks5Repository<tigase.db.DataRepository>
        Throws:
        tigase.db.TigaseDBException