Cisco Systems, Inc.

com.pcube.apps.quota.api
Class QuotaBucketsProfileInternal

java.lang.Object
  extended by com.pcube.apps.quota.api.QuotaBucketsProfile
      extended by com.pcube.apps.quota.api.QuotaBucketsProfileLegacy
          extended by com.pcube.apps.quota.api.QuotaBucketsProfileInternal

public class QuotaBucketsProfileInternal
extends QuotaBucketsProfileLegacy

API for configuring internal quota bucktes. Allow configuring the buckets type and volume. Attach Service (session/upload/downlaod) to be counted on which bucket.

Author:
rbaryana

Nested Class Summary
 
Nested classes/interfaces inherited from class com.pcube.apps.quota.api.QuotaBucketsProfileLegacy
QuotaBucketsProfileLegacy.InternalBucketType
 
Constructor Summary
QuotaBucketsProfileInternal(Policy p, java.lang.String name)
           
 
Method Summary
 void attachDownBucket(java.lang.String serviceName, int bucketId)
          Service download to be counted on bucket
 void attachDownBucket(java.lang.String serviceName, int bucketId, int serviceFrameNum)
          Service download to be counted on bucket
 void attachSessionBucket(java.lang.String serviceName, int bucketId)
          Service session to be counted on bucket.
 void attachSessionBucket(java.lang.String serviceName, int bucketId, int serviceFrameNum)
          Service session to be counted on bucket.
 void attachUpBucket(java.lang.String serviceName, int bucketId)
          Service upload to be counted on bucket
 void attachUpBucket(java.lang.String serviceName, int bucketId, int serviceFrameNum)
          Service upload to be counted on bucket
static void main(java.lang.String[] args)
           
 void setBucketType(int id, QuotaBucketsProfileLegacy.InternalBucketType type)
          set bucket type.
 void setBucketVolume(int id, long value)
          Set bucket value.
 
Methods inherited from class com.pcube.apps.quota.api.QuotaBucketsProfile
getMyName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuotaBucketsProfileInternal

public QuotaBucketsProfileInternal(Policy p,
                                   java.lang.String name)
Parameters:
p - - policy
name - - profile name (must be unique on policy)
Method Detail

setBucketType

public void setBucketType(int id,
                          QuotaBucketsProfileLegacy.InternalBucketType type)
set bucket type. (must be called before any attach method called).

Parameters:
id - - bucket id 1-16
type - - session/L3kbytes.

setBucketVolume

public void setBucketVolume(int id,
                            long value)
Set bucket value. must be called before any attach method called.

Parameters:
id - - bucket id 1-16
value - - integer

attachSessionBucket

public void attachSessionBucket(java.lang.String serviceName,
                                int bucketId)
                         throws QuotaDataException
Service session to be counted on bucket. bucket type must be session and service rule for that service must exists.

Parameters:
serviceName -
bucketId -
Throws:
QuotaDataException

attachSessionBucket

public void attachSessionBucket(java.lang.String serviceName,
                                int bucketId,
                                int serviceFrameNum)
                         throws QuotaDataException
Service session to be counted on bucket. bucket type must be session and service rule fo that service must exists.

Parameters:
service -
bucketId -
serviceFrameNum - - time frame 1-4.
Throws:
QuotaDataException

attachUpBucket

public void attachUpBucket(java.lang.String serviceName,
                           int bucketId)
                    throws QuotaDataException
Service upload to be counted on bucket

Parameters:
service -
bucketId -
Throws:
QuotaDataException

attachUpBucket

public void attachUpBucket(java.lang.String serviceName,
                           int bucketId,
                           int serviceFrameNum)
                    throws QuotaDataException
Service upload to be counted on bucket

Parameters:
service -
sessionBucket -
Throws:
QuotaDataException

attachDownBucket

public void attachDownBucket(java.lang.String serviceName,
                             int bucketId)
                      throws QuotaDataException
Service download to be counted on bucket

Parameters:
service -
bucketId -
Throws:
QuotaDataException

attachDownBucket

public void attachDownBucket(java.lang.String serviceName,
                             int bucketId,
                             int serviceFrameNum)
                      throws QuotaDataException
Service download to be counted on bucket

Parameters:
service -
sessionBucket -
Throws:
QuotaDataException

main

public static void main(java.lang.String[] args)
                 throws QuotaDataException
Throws:
QuotaDataException

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.