MCPcopy Create free account
hub / github.com/M66B/FairEmail / setQuota

Method setQuota

app/src/main/java/com/sun/mail/imap/IMAPStore.java:2101–2117  ·  view source on GitHub ↗

Set the quotas for the quota root specified in the quota argument. Typically this will be one of the quota roots obtained from the getQuota method, but it need not be. @param quota the quota to set @exception MessagingException if the server doesn't support the QUOTA extension

(Quota quota)

Source from the content-addressed store, hash-verified

2099 * QUOTA extension
2100 */
2101 @Override
2102 public synchronized void setQuota(Quota quota) throws MessagingException {
2103 checkConnected();
2104 IMAPProtocol p = null;
2105 try {
2106 p = getStoreProtocol("setQuota");
2107 p.setQuota(quota);
2108 } catch (BadCommandException bex) {
2109 throw new MessagingException("QUOTA not supported", bex);
2110 } catch (ConnectionException cex) {
2111 throw new StoreClosedException(this, cex.getMessage());
2112 } catch (ProtocolException pex) {
2113 throw new MessagingException(pex.getMessage(), pex);
2114 } finally {
2115 releaseStoreProtocol(p);
2116 }
2117 }
2118
2119 private void checkConnected() {
2120 assert Thread.holdsLock(this);

Callers

nothing calls this directly

Calls 5

checkConnectedMethod · 0.95
getStoreProtocolMethod · 0.95
setQuotaMethod · 0.95
releaseStoreProtocolMethod · 0.95
getMessageMethod · 0.65

Tested by

no test coverage detected