Kanzi Connect  3.9.9
Kanzi Connect C++ API
kanzi::connect::PolicyControllerInterface Class Referenceabstract

This interface provides a mechanism to control Connect behavior for scheduling and memory access. More...

#include <policy_interface.hpp>

Public Types

enum  Throttle { NoLimit = 0, DropPacket = 1, DontRead = 2, Disconnect = 3 }
 

Public Member Functions

virtual void demoteClient (int clientId, int timeout)=0
 The external commands induced by policy evaluation. More...
 
virtual void disconnectClient (int clientId)=0
 Disconnect client. More...
 
virtual void eraseClientPriority (int clientId)=0
 Removes the priority assigned to a particular client id. More...
 
virtual void eraseThrottle (int clientId)=0
 Removes the socket throttling info for a particular clientID. More...
 
virtual ConnectWorkItem::Priority getClientPriority (int clientId)=0
 Returns the priority assigned to a particular client id. More...
 
virtual Throttle getThrottle (int clientId)=0
 
virtual void promoteClient (int clientId, int timeout)=0
 Increase client priority. More...
 
virtual void resetCmd (int clientId)=0
 
virtual void stopNetwork (int clientId, int timeout)=0
 Do not read from the network. More...
 
virtual ~PolicyControllerInterface ()
 

Detailed Description

This interface provides a mechanism to control Connect behavior for scheduling and memory access.

It is expected that policy engine sets some values in here which are then read by various pieces in the

Member Enumeration Documentation

◆ Throttle

Enumerator
NoLimit 
DropPacket 

no effect

DontRead 

read packet from network interface but drop it not yet valid for anything

Disconnect 

do not read from buffer

Constructor & Destructor Documentation

◆ ~PolicyControllerInterface()

virtual kanzi::connect::PolicyControllerInterface::~PolicyControllerInterface ( )
inlinevirtual

Member Function Documentation

◆ demoteClient()

virtual void kanzi::connect::PolicyControllerInterface::demoteClient ( int  clientId,
int  timeout 
)
pure virtual

The external commands induced by policy evaluation.

Reduce client priority

Parameters
clientIdidentifies client
timeoutmilliseconds of applicability for the demotion, -1 for permanent effect

◆ disconnectClient()

virtual void kanzi::connect::PolicyControllerInterface::disconnectClient ( int  clientId)
pure virtual

Disconnect client.

Parameters
clientIdidentifies client

◆ eraseClientPriority()

virtual void kanzi::connect::PolicyControllerInterface::eraseClientPriority ( int  clientId)
pure virtual

Removes the priority assigned to a particular client id.

Parameters
clienIdthe ID of a connected client

◆ eraseThrottle()

virtual void kanzi::connect::PolicyControllerInterface::eraseThrottle ( int  clientId)
pure virtual

Removes the socket throttling info for a particular clientID.

Parameters
clienIdthe ID of a connected client

◆ getClientPriority()

virtual ConnectWorkItem::Priority kanzi::connect::PolicyControllerInterface::getClientPriority ( int  clientId)
pure virtual

Returns the priority assigned to a particular client id.

Parameters
clienIdthe ID of a connected client, XXX unique per execution?
Returns
priority level

◆ getThrottle()

virtual Throttle kanzi::connect::PolicyControllerInterface::getThrottle ( int  clientId)
pure virtual

◆ promoteClient()

virtual void kanzi::connect::PolicyControllerInterface::promoteClient ( int  clientId,
int  timeout 
)
pure virtual

Increase client priority.

Parameters
clientIdidentifies client
timeoutmilliseconds of applicability for the demotion, -1 for permanent effect

◆ resetCmd()

virtual void kanzi::connect::PolicyControllerInterface::resetCmd ( int  clientId)
pure virtual

◆ stopNetwork()

virtual void kanzi::connect::PolicyControllerInterface::stopNetwork ( int  clientId,
int  timeout 
)
pure virtual

Do not read from the network.

Parameters
clientIdidentifies client
timeoutmilliseconds of applicability for the demotion, -1 for permanent effect

The documentation for this class was generated from the following file: