longpolling

package
v0.0.0-...-1897b02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

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.

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.

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManyPullRequest

type ManyPullRequest struct {
	// contains filtered or unexported fields
}

ManyPullRequest 长轮询请求 Author rongzhihong Since 2017/9/5

func (*ManyPullRequest) AddManyPullRequest

func (req *ManyPullRequest) AddManyPullRequest(mpr []*PullRequest)

AddManyPullRequest 插入请求列表 Author rongzhihong Since 2017/9/5

func (*ManyPullRequest) AddPullRequest

func (req *ManyPullRequest) AddPullRequest(pullRequest *PullRequest)

AddPullRequest 插入请求 Author rongzhihong Since 2017/9/5

func (*ManyPullRequest) CloneListAndClear

func (req *ManyPullRequest) CloneListAndClear() []*PullRequest

CloneListAndClear 克隆并清空请求列表 Author rongzhihong Since 2017/9/5

type PullRequest

type PullRequest struct {
	RequestCommand     *protocol.RemotingCommand
	Context            core.Context
	TimeoutMillis      int64
	SuspendTimestamp   int64
	PullFromThisOffset int64
}

PullRequest 拉消息请求 Author gaoyanlei Since 2017/8/18

func NewPullRequest

func NewPullRequest(requestCommand *protocol.RemotingCommand, ctx core.Context, timeoutMillis, suspendTimestamp, pullFromThisOffset int64) *PullRequest

type PullRequestTable

type PullRequestTable struct {
	PullRequestMap map[string]*ManyPullRequest // key:topic@queueId
	// contains filtered or unexported fields
}

PullRequestTable 消息集合 Author rongzhihong Since 2017/9/5

func NewPullRequestTable

func NewPullRequestTable() *PullRequestTable

newPullRequestTable 初始化消息集合 Author rongzhihong Since 2017/9/5

func (*PullRequestTable) Get

func (table *PullRequestTable) Get(k string) *ManyPullRequest

get 获得key对应的value Author rongzhihong Since 2017/9/5

func (*PullRequestTable) Put

func (table *PullRequestTable) Put(k string, v *ManyPullRequest)

put 存放消息 Author rongzhihong Since 2017/9/5

func (*PullRequestTable) PutIfAbsent

func (table *PullRequestTable) PutIfAbsent(k string, v *ManyPullRequest) *ManyPullRequest

putIfAbsent 不存在时,才存放消息 Author rongzhihong Since 2017/9/5

func (*PullRequestTable) Remove

func (table *PullRequestTable) Remove(k string) *ManyPullRequest

remove 删除消息 Author rongzhihong Since 2017/9/5

func (*PullRequestTable) Size

func (table *PullRequestTable) Size() int

size 消息集合长度 Author rongzhihong Since 2017/9/5

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL