MockServerThread Derived Type

type, public, extends(ServerThread) :: MockServerThread


Inherits

type~~mockserverthread~~InheritsGraph type~mockserverthread MockServerThread type~serverthread ServerThread type~mockserverthread->type~serverthread IntegerVector IntegerVector type~serverthread->IntegerVector sub_array_types type~abstractserver AbstractServer type~serverthread->type~abstractserver containing_server type~basethread BaseThread type~serverthread->type~basethread type~extcollectionvector ExtCollectionVector type~serverthread->type~extcollectionvector ext_collections type~historycollectionvector HistoryCollectionVector type~serverthread->type~historycollectionvector hist_collections type~messagevector MessageVector type~serverthread->type~messagevector request_backlog StringInteger64Map StringInteger64Map type~abstractserver->StringInteger64Map prefetch_offset, stage_offset type~abstractdatareferencevector AbstractDataReferenceVector type~abstractserver->type~abstractdatareferencevector dataRefPtrs type~abstractsocket AbstractSocket type~basethread->type~abstractsocket connection type~integerrequestmap IntegerRequestMap type~basethread->type~integerrequestmap open_requests type~messagevisitor MessageVisitor type~basethread->type~messagevisitor type~extdatacollection ExtDataCollection type~extcollectionvector->type~extdatacollection elements type~historycollection HistoryCollection type~historycollectionvector->type~historycollection elements type~v_wrapper~7 v_Wrapper type~messagevector->type~v_wrapper~7 elements type~v_wrapper~9 v_Wrapper type~abstractdatareferencevector->type~v_wrapper~9 elements StringIntegerMap StringIntegerMap type~extdatacollection->StringIntegerMap file_ids type~formatterptrvector FormatterPtrVector type~extdatacollection->type~formatterptrvector formatters type~netcdf4_fileformatter NetCDF4_FileFormatter type~extdatacollection->type~netcdf4_fileformatter formatter type~filemetadata FileMetadata type~historycollection->type~filemetadata fmd type~stringnetcdf4_fileformattermap StringNetCDF4_FileFormatterMap type~historycollection->type~stringnetcdf4_fileformattermap formatters type~set2~9 set2 type~integerrequestmap->type~set2~9 tree type~surrogatemessagevisitor SurrogateMessageVisitor type~messagevisitor->type~surrogatemessagevisitor type~abstractmessage AbstractMessage type~v_wrapper~7->type~abstractmessage item

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: log
logical, public :: terminate = .false.
type(HistoryCollectionVector), public :: hist_collections
type(MessageVector), public :: request_backlog

Constructor

public interface MockServerThread

  • private function new_MockServerThread(sckt) result(s)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractSocket), intent(in), target :: sckt

    Return Value type(MockServerThread)


Type-Bound Procedures

procedure, public :: clear_RequestHandle

  • private subroutine clear_RequestHandle(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseThread), intent(inout), target :: this
    integer, intent(out), optional :: rc

procedure, public :: clear_backlog

  • private subroutine clear_backlog(this)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this

procedure, public :: clear_hist_collections

  • private subroutine clear_hist_collections(this)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this

procedure, public :: clear_subarray

  • private subroutine clear_subarray(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: clear_terminate

  • private subroutine clear_terminate(this)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this

procedure, public :: do_terminate

  • private function do_terminate(this)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(in) :: this

    Return Value logical

procedure, public :: erase_RequestHandle

  • private subroutine erase_RequestHandle(this, request_id, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseThread), intent(inout), target :: this
    integer, intent(in) :: request_id
    integer, intent(out), optional :: rc

procedure, public :: get_DataFromFile

  • private subroutine get_DataFromFile(this, message, address, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    class(AbstractDataMessage), intent(in) :: message
    type(c_ptr), intent(in) :: address
    integer, intent(out), optional :: rc

procedure, public :: get_DataFromMem

  • private subroutine get_DataFromMem(this, multi_data_read, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    logical, intent(in) :: multi_data_read
    integer, intent(out), optional :: rc

procedure, public :: get_RequestHandle

  • private function get_RequestHandle(this, request_id, rc) result(rh_ptr)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseThread), intent(in), target :: this
    integer, intent(in) :: request_id
    integer, intent(out), optional :: rc

    Return Value class(AbstractRequestHandle), pointer

procedure, public :: get_connection

  • private function get_connection(this, rc) result(connection)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseThread), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value class(AbstractSocket), pointer

procedure, public :: get_hist_collection

  • private function get_hist_collection(this, collection_id) result(c)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    integer, intent(in) :: collection_id

    Return Value type(HistoryCollection), pointer

procedure, public :: handle

  • private recursive subroutine handle(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    class(AbstractMessage), intent(in), target :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_AddExtCollection

  • private subroutine handle_AddExtCollection(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockServerThread), intent(inout), target :: this
    type(AddExtCollectionMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_AddHistCollection

  • private subroutine handle_AddHistCollection(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(AddHistCollectionMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_CollectivePrefetchData

  • private subroutine handle_CollectivePrefetchData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(CollectivePrefetchDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_CollectiveStageData

  • private subroutine handle_CollectiveStageData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(CollectiveStageDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Done

  • private subroutine handle_Done(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockServerThread), intent(inout), target :: this
    type(DoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Done_collective_prefetch

  • private recursive subroutine handle_Done_collective_prefetch(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(CollectivePrefetchDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Done_collective_stage

  • private recursive subroutine handle_Done_collective_stage(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(CollectiveStageDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Done_prefetch

  • private subroutine handle_Done_prefetch(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockServerThread), intent(inout), target :: this
    type(PrefetchDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Done_stage

  • private recursive subroutine handle_Done_stage(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(StageDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_HandShake

  • private subroutine handle_HandShake(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(HandShakeMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Id

  • private subroutine handle_Id(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout) :: this
    type(IDMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_ModifyMetadata

  • private subroutine handle_ModifyMetadata(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(ModifyMetadataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_PrefetchData

  • private subroutine handle_PrefetchData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockServerThread), intent(inout), target :: this
    type(PrefetchDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_ReplaceMetadata

  • private subroutine handle_ReplaceMetadata(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(ReplaceMetadataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_StageData

  • private subroutine handle_StageData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    type(StageDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: handle_Terminate

  • private subroutine handle_Terminate(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockServerThread), intent(inout) :: this
    type(TerminateMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Done

  • private subroutine handle_Done(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(DoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Done_prefetch

  • private subroutine handle_Done_prefetch(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(PrefetchDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Done_collective_prefetch

  • private subroutine handle_Done_collective_prefetch(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(CollectivePrefetchDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Done_stage

  • private subroutine handle_Done_stage(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(StageDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Done_collective_stage

  • private subroutine handle_Done_collective_stage(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(CollectiveStageDoneMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_AddExtCollection

  • private subroutine handle_AddExtCollection(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(AddExtCollectionMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_AddHistCollection

  • private subroutine handle_AddHistCollection(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(AddHistCollectionMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Id

  • private subroutine handle_Id(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ClientThread), intent(inout) :: this
    type(IDMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_PrefetchData

  • private subroutine handle_PrefetchData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(PrefetchDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_CollectivePrefetchData

  • private subroutine handle_CollectivePrefetchData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(CollectivePrefetchDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_StageData

  • private subroutine handle_StageData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(StageDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_CollectiveStageData

  • private subroutine handle_CollectiveStageData(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(CollectiveStageDataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_Terminate

  • private subroutine handle_Terminate(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout) :: this
    type(TerminateMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_ModifyMetadata

  • private subroutine handle_ModifyMetadata(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(ModifyMetadataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_ReplaceMetadata

  • private subroutine handle_ReplaceMetadata(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(ReplaceMetadataMessage), intent(in) :: message
    integer, intent(out), optional :: rc

generic, public :: handle_cmd => handle_HandShake

  • private subroutine handle_HandShake(this, message, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MessageVisitor), intent(inout), target :: this
    type(HandShakeMessage), intent(in) :: message
    integer, intent(out), optional :: rc

procedure, public :: init

  • private subroutine init(this, sckt, server, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    class(AbstractSocket), intent(in), target :: sckt
    class(AbstractServer), intent(in), target :: server
    integer, intent(out), optional :: rc

procedure, public :: insert_RequestHandle

  • private subroutine insert_RequestHandle(this, request_id, handle, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseThread), intent(inout), target :: this
    integer, intent(in) :: request_id
    class(AbstractRequestHandle), intent(in) :: handle
    integer, intent(out), optional :: rc

procedure, public :: isEmpty_RequestHandle

  • private function isEmpty_RequestHandle(this, rc) result(empty)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseThread), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value logical

procedure, public :: prefix

  • private subroutine prefix(this, string)

    Arguments

    Type IntentOptional Attributes Name
    class(MockServerThread), intent(inout) :: this
    character(len=*), intent(in) :: string

procedure, public :: put_DataToFile

  • private subroutine put_DataToFile(this, message, address, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    class(AbstractDataMessage), intent(in) :: message
    type(c_ptr), intent(in) :: address
    integer, intent(out), optional :: rc

procedure, public :: read_and_gather

  • private function read_and_gather(this, rc) result(dataRefPtr)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    integer, intent(out), optional :: rc

    Return Value class(AbstractDataReference), pointer

procedure, public :: read_and_share

  • private function read_and_share(this, rc) result(dataRefPtr)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    integer, intent(out), optional :: rc

    Return Value class(AbstractDataReference), pointer

procedure, public :: receive_output_data

  • private subroutine receive_output_data(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout), target :: this
    integer, intent(out), optional :: rc

procedure, public :: run

  • private subroutine run(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: set_collective_request

  • private subroutine set_collective_request(this, request, have_done)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    logical, intent(in) :: request
    logical, intent(in) :: have_done

procedure, public :: set_connection

  • private subroutine set_connection(this, connection, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(BaseThread), intent(inout), target :: this
    class(AbstractSocket), intent(in) :: connection
    integer, intent(out), optional :: rc

procedure, public :: set_rank

  • private subroutine set_rank(this, rank)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this
    integer, intent(in) :: rank

procedure, public :: set_terminate

  • private subroutine set_terminate(this)

    Arguments

    Type IntentOptional Attributes Name
    class(ServerThread), intent(inout) :: this

Source Code

   type, extends(ServerThread) :: MockServerThread
      character(len=:), allocatable :: log
   contains
      procedure :: prefix
      procedure :: handle_Terminate
      procedure :: handle_Done
      procedure :: handle_Done_prefetch
      procedure :: handle_AddExtCollection
      procedure :: handle_PrefetchData
   end type MockServerThread