Data Structures | Defines | Typedefs

I_Continuation.h File Reference

A brief file description. More...

#include "libts.h"
#include "I_Lock.h"
Include dependency graph for I_Continuation.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  force_VFPT_to_top
class  Continuation
 Base class for all state machines to receive notification of events. More...

Defines

#define CONTINUATION_EVENT_NONE   0
#define CONTINUATION_DONE   0
#define CONTINUATION_CONT   1
#define SET_HANDLER(_h)   (handler = ((ContinuationHandler)_h))
 Sets the Continuation's handler.
#define SET_CONTINUATION_HANDLER(_c, _h)   (_c->handler = ((ContinuationHandler) _h))
 Sets a Continuation's handler.

Typedefs

typedef int(Continuation::* ContinuationHandler )(int event, void *data)

Detailed Description

A brief file description.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Details

Continuations have a handleEvent() method to invoke them. Users can determine the behavior of a Continuation by suppling a "ContinuationHandler" (member function name) which is invoked when events arrive. This function can be changed with the "setHandler" method.

Continuations can be subclassed to add additional state and methods.

Definition in file I_Continuation.h.


Define Documentation

#define CONTINUATION_CONT   1

Definition at line 57 of file I_Continuation.h.

#define CONTINUATION_DONE   0

Definition at line 56 of file I_Continuation.h.

#define CONTINUATION_EVENT_NONE   0

Definition at line 54 of file I_Continuation.h.

#define SET_CONTINUATION_HANDLER (   _c,
  _h 
)    (_c->handler = ((ContinuationHandler) _h))

Sets a Continuation's handler.

The preferred mechanism for setting the Continuation's handler.

Parameters:
_c Pointer to a Continuation whose handler is being set.
_h Pointer to the function used to callback with events.

Definition at line 187 of file I_Continuation.h.

Referenced by NetAccept::acceptFastEvent(), cache_lookup_ClusterFunction(), cache_op_ClusterFunction(), cache_op_result_ClusterFunction(), CacheContinuation::callback_failure(), ClusterProcessor::connect(), Cache::deref(), dns_result(), HostDBContinuation::dnsEvent(), NetAccept::do_blocking_accept(), CacheContinuation::do_op(), CacheContinuation::do_remote_lookup(), UnixNetVConnection::free(), SSLNetVConnection::free(), free_CacheVC(), get_congest_entry(), get_congest_list(), get_hostinfo_ClusterFunction(), HostDBProcessor::getbyname_imm(), HostDBProcessor::getSRVbyname_imm(), ICPConfiguration::icp_config_change_callback(), ICPProcessor::ICPQuery(), NetAccept::init_accept_loop(), ClusterProcessor::internal_invoke_remote(), Cache::link(), Cache::lookup(), CacheContinuation::lookupOpenWriteVC(), CacheContinuation::lookupOpenWriteVCEvent(), ICPConfiguration::mgr_icp_config_change_callback(), net_accept(), new_CacheRemoveCont(), new_DocEvacuator(), DNSProcessor::open(), Cache::open_read(), Cache::open_write(), RemapProcessor::perform_remap(), ICPPeriodicCont::PeriodicEvent(), put_hostinfo_ClusterFunction(), redirect_test(), register_ShowCache(), register_ShowCacheInternal(), register_ShowHostDB(), register_ShowNet(), Cache::remove(), Cache::scan(), HostDBProcessor::setby(), HostDBProcessor::setby_srv(), CacheContinuation::setup_local_vc(), CacheContinuation::setupReadBufTunnel(), ICPProcessor::start(), and HostDBProcessor::start().

#define SET_HANDLER (   _h  )     (handler = ((ContinuationHandler)_h))

Sets the Continuation's handler.

The preferred mechanism for setting the Continuation's handler.

Parameters:
_h Pointer to the function used to callback with events.

Definition at line 170 of file I_Continuation.h.

Referenced by UnixNetVConnection::acceptEvent(), ActionSink::ActionSink(), Vol::aggWrite(), AIO_Callback_handler::AIO_Callback_handler(), AIOCallbackInternal::AIOCallbackInternal(), AIOThreadInfo::AIOThreadInfo(), HttpClientSession::attach_server_session(), AutoStopCont::AutoStopCont(), ClusterHandler::beginClusterEvent(), PrefetchBlaster::blastObject(), TestProxy::cacheCheckEvent(), CacheContinuation::CacheContinuation(), TestProxy::cacheCreateCacheFileEvent(), CacheHostTableConfig::CacheHostTableConfig(), TestProxy::cacheReadEvent(), TestProxy::cacheSendGetEvent(), CacheSync::CacheSync(), CacheTestSM::CacheTestSM(), TestProxy::cacheTransRemoteToCacheFileEvent(), CC_FreerContinuation::CC_FreerContinuation(), CC_UpdateContinuation::CC_UpdateContinuation(), CCCongestionDBTestCont::CCCongestionDBTestCont(), CCFailHistoryTestCont::CCFailHistoryTestCont(), CheckConnect::CheckConnect(), Vol::clear_dir(), CacheDisk::clearDone(), ClusterAccept::ClusterAccept(), ClusterAPIPeriodicSM::ClusterAPIPeriodicSM(), ClusterCalloutContinuation::ClusterCalloutContinuation(), TestProxy::clusterEvent(), ClusterHandler::ClusterHandler(), ClusterLoadMonitor::ClusterLoadMonitor(), TestProxy::clusterOpenEvent(), ClusterState::ClusterState(), ClusterVConnection::ClusterVConnection(), ClusterVConnectionCacheEvent::ClusterVConnectionCacheEvent(), CmdCacheCont::CmdCacheCont(), config_update_cont::config_update_cont(), ConfigUpdateCallback::ConfigUpdateCallback(), ConfigurationContinuation::ConfigurationContinuation(), ClusterHandler::connectClusterEvent(), TestProxy::connectEvent(), UnixNetVConnection::connectUp(), CacheContinuation::defer_callback_result(), DNSEntry::delayEvent(), ShowCache::delete_regex(), ShowCache::delete_url(), DeleterContinuation< C >::DeleterContinuation(), DereferContinuation< C >::DereferContinuation(), CacheVC::die(), Vol::dir_init_done(), TestProxy::dnsEvent(), HostDBContinuation::dnsEvent(), DNSHandler::DNSHandler(), HostDBContinuation::dnsPendingEvent(), ProxyClientSession::do_api_callout(), HostDBContinuation::do_dns(), HostDBContinuation::do_get_response(), HttpClientSession::do_io_close(), Vol::evac_range(), CacheVC::evacuateDocDone(), TestProxy::fileEvent(), FreeCallContinuation< C >::FreeCallContinuation(), FreerContinuation::FreerContinuation(), GlobalClusterPeriodicEvent::GlobalClusterPeriodicEvent(), HttpPagesHandler::handle_callback(), Vol::handle_dir_clear(), Vol::handle_header_read(), NetTesterSM::handle_read(), Vol::handle_recover_from_data(), Vol::handle_recover_write_dir(), PrefetchBlaster::handleEvent(), CacheVC::handleRead(), MultiCacheSync::heapEvent(), HostDBContinuation::HostDBContinuation(), HostDBSyncer::HostDBSyncer(), HostDBTestReverse::HostDBTestReverse(), HostDBTestRR::HostDBTestRR(), Http2ConnectionState::Http2ConnectionState(), Http2SessionAccept::Http2SessionAccept(), PrefetchBlaster::httpClient(), HttpConfigCont::HttpConfigCont(), HttpPagesHandler::HttpPagesHandler(), HttpSessionAccept::HttpSessionAccept(), ICPPeerReadCont::ICPPeerQueryCont(), ICPPeerReadCont::ICPPeerQueryEvent(), InactivityCop::InactivityCop(), SpdyClientSession::init(), SocksProxy::init(), SocksEntry::init(), KeepAliveLockHandler::init(), BlasterUrlList::init(), KeepAliveConn::init(), PrefetchBlaster::init(), UnixUDPConnection::init(), OneWayTunnel::init(), OneWayMultiTunnel::init(), INKVConnInternal::init(), INKContInternal::init(), ICPPeerReadCont::init(), HttpTunnel::init(), HttpSM::init(), DNSEntry::init(), Vol::init(), NetAccept::init_accept(), NetAccept::init_accept_per_thread(), SSLNetAccept::init_accept_per_thread(), FetchSM::init_comm(), UDPReadContinuation::init_read(), NetVCTest::init_test(), INKContInternal::INKContInternal(), INKVConnInternal::INKVConnInternal(), CacheContinuation::insert_cache_callback_user(), ShowCache::invalidate_regex(), CacheContinuation::localVCsetupEvent(), LogCollationAccept::LogCollationAccept(), LogCollationClientSM::LogCollationClientSM(), LogCollationHostSM::LogCollationHostSM(), LoggingCollateContinuation::LoggingCollateContinuation(), LoggingFlushContinuation::LoggingFlushContinuation(), LoggingPreprocContinuation::LoggingPreprocContinuation(), ShowCache::lookup_regex(), ShowCache::lookup_url(), MachineStatusSM::MachineStatusSM(), MachineTimeoutContinuation::MachineTimeoutContinuation(), Http2ConnectionState::main_event_handler(), SocksEntry::mainEvent(), DNSEntry::mainEvent(), MultiCacheSync::mcEvent(), MultiCacheHeapGC::MultiCacheHeapGC(), MultiCacheSync::MultiCacheSync(), NetHandler::NetHandler(), NetTesterAccept::NetTesterAccept(), NetTesterSM::NetTesterSM(), NullTransform::NullTransform(), ObjectReloadCont::ObjectReloadCont(), OOB_callback::OOB_callback(), CacheDisk::open(), HttpCacheSM::open_read(), HttpCacheSM::open_write(), OpenDir::OpenDir(), CacheDisk::openDone(), CacheVC::openReadFromWriter(), CacheVC::openReadMain(), CacheVC::openReadReadDone(), CacheVC::openReadStartEarliest(), CacheVC::openReadStartHead(), CacheDisk::openStart(), CacheVC::openWriteClose(), CacheVC::openWriteCloseDir(), CacheVC::openWriteCloseHead(), CacheVC::openWriteMain(), CacheVC::openWriteOverwrite(), CacheVC::openWriteStartBegin(), CacheVC::openWriteWriteDone(), MultiCacheSync::pauseEvent(), PeriodicWakeup::PeriodicWakeup(), PluginVC::PluginVC(), PollCont::PollCont(), DNSEntry::post(), PrefetchConfigCont::PrefetchConfigCont(), PrefetchConfigFreerCont::PrefetchConfigFreerCont(), PrefetchTransform::PrefetchTransform(), ProtocolProbeSessionAccept::ProtocolProbeSessionAccept(), ProtocolProbeTrampoline::ProtocolProbeTrampoline(), ClusterHandler::protoZombieEvent(), RamCacheCLFUSCompressor::RamCacheCLFUSCompressor(), RangeTransform::RangeTransform(), raw_stat_sync_cont::raw_stat_sync_cont(), Vol::recover_data(), RecursiveHttpGet::RecursiveHttpGet(), RecursiveHttpGet::RecursiveHttpGetEvent(), RegressionCont::RegressionCont(), HttpClientSession::release(), CacheContinuation::remoteOpEvent(), CacheContinuation::remove_and_delete(), CacheVC::removeEvent(), retryDisposeOfDataBuffer::retryDisposeOfDataBuffer(), RegressionSM::run(), RegressionSM::run_in(), CacheVC::scanObject(), CacheVC::scanOpenWrite(), CacheVC::scanRemoveDone(), CacheVC::scanUpdateDone(), CacheVC::scanVol(), UpdateScheduler::ScheduleEvent(), TestProxy::sendEvent(), ServerSessionPool::ServerSessionPool(), SessionAccept::SessionAccept(), CacheContinuation::setupReadWriteVC(), CacheContinuation::setupVCdataRead(), ShowCache::ShowCache(), ShowCacheInternal::ShowCacheInternal(), ShowNet::showConnections(), ShowCacheInternal::showEvacuations(), ShowHostDB::ShowHostDB(), ShowHostDB::showLookup(), ShowNet::ShowNet(), ShowCacheInternal::showSegments(), ShowStats::ShowStats(), ShowNet::showThreads(), ShowCacheInternal::showVolumes(), ShowCacheInternal::showVolVolumes(), SignalContinuation::SignalContinuation(), SnapCont::SnapCont(), SnapStatsContinuation::SnapStatsContinuation(), SocksAccepter::SocksAccepter(), SpdySessionAccept::SpdySessionAccept(), SSLNextProtocolAccept::SSLNextProtocolAccept(), SSLNextProtocolTrampoline::SSLNextProtocolTrampoline(), ICPPeerReadCont::StaleCheck(), Http2ClientSession::start(), PVCTestDriver::start_tests(), ClusterHandler::startClusterEvent(), TestProxy::startEvent(), SocksEntry::startEvent(), DNSHandler::startEvent(), DNSHandler::startEvent_sdns(), UDPNetHandler::startNetEvent(), NetHandler::startNetEvent(), PluginVCCore::state_send_accept(), PluginVCCore::state_send_accept_failed(), Stop::Stop(), sync_cont::sync_cont(), HostDBSyncer::sync_event(), TestAccept::TestAccept(), TestDnsStateMachine::TestDnsStateMachine(), TestProxy::TestProxy(), TrackerContinuation::TrackerContinuation(), TransformControl::TransformControl(), TransformTerminus::TransformTerminus(), TransformVConnection::TransformVConnection(), TSHttpSMCallback::TSHttpSMCallback(), TSHttpSsnCallback::TSHttpSsnCallback(), UDPNetHandler::UDPNetHandler(), PrefetchUrlBlaster::udpUrlBlaster(), UnixNetVConnection::UnixNetVConnection(), UnixUDPConnection::UnixUDPConnection(), UpdateConfigManager::UpdateConfigManager(), UpdateScheduler::UpdateScheduler(), UpdateSM::UpdateSM(), UpTest::UpTest(), UR_UpdateContinuation::UR_UpdateContinuation(), CacheContinuation::VCdataRead(), VConnection::VConnection(), Vol::Vol(), HostDBSyncer::wait_event(), ConfigurationContinuation::zombieEvent(), and ClusterHandler::zombify().


Typedef Documentation

typedef int(Continuation::* ContinuationHandler)(int event, void *data)

Definition at line 59 of file I_Continuation.h.